function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scotty ForceScotty Force 

Trigger question?

Have two custom objects Book__c and Order__c. They have a lookup relationship between them. Created a new field 'Quantity' on Book__c. Want to write a trigger to update Quantity value on Order__c. I know this can be done via process builder. Any help?
Best Answer chosen by Scotty Force
Ajay K DubediAjay K Dubedi
Hi Scotty,
If Book__c is the parent and Order__c is child and Quantity__c is the custom field on both then if you update Quantity__c on Book__c then to update that value to Order__c, you can create that field on Order__c as Formula field returning number.
Write this in Formula section:-
 
Book__r.Quantity__c

Thanks 
Ajay