Salesforce Fact #480 | Inner query in trigger

Suppose we have a use case where we need to check when an account record is updated, if it has at least one of each related contacts, opportunities and cases.

We can use inner query to get the related records list and check the same instead of doing separate queries on each of the objects.

Attached is the screenshot.



Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow