Development questions
Write a SOQL query on Contact to fetch the Contact's Name and its parent Account's Name and Industry (Child-to-Parent).
Use dot notation from the Contact to its parent Account to read parent fields in the same query, with no join needed.
soql
SELECT Id, Name, Account.Name, Account.Industry FROM Contact
Contacts without an Account still appear, with null parent values.
soqlscenariochild-to-parent
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?