+ Start a Discussion
Yogesh BiyaniYogesh Biyani 

How to find all the master records when a related object is updated

A custom object is associated with account and contact via a lookup field.  Is it possible to find all accounts and contacts of all the custom object records which are updated using a SOQL query? 
Valentin F.Valentin F.
SELECT Id, Account__r.Id, Account__r.Name, Contact__r.Id, Contact__r.Name 
FROM Custom_Object__c 
WHERE Id =: id;
Create a process builder to call the class containing this query whenever a record of this custom object is updated.