You need to sign in to do that
Don't have an account?
SFUser
Update Parent Record Fields when Child record is change its parent value
I have 2 Objects..i.e. Parent & Child objects.
In Parent Object.., i have 2 fields..numberOfRecords__c & Total_Amount__c.
In Child Object.., i have 2 fields..Parent__c(lookup to Parent__c) & Amount__c.
Now my requirement is whenever the child record is changes to another new Parent record..
then i want to update Both (numberOfRecords__c & Total_Amount__c) fields for new Parent record.
Suggest any code.
Thanks in Advance.
In Parent Object.., i have 2 fields..numberOfRecords__c & Total_Amount__c.
In Child Object.., i have 2 fields..Parent__c(lookup to Parent__c) & Amount__c.
Now my requirement is whenever the child record is changes to another new Parent record..
then i want to update Both (numberOfRecords__c & Total_Amount__c) fields for new Parent record.
Suggest any code.
Thanks in Advance.
Try Below Code
If You Don't Want To Code You Can Use Roll-up Summary Field But Make Sure Object Have Master-detail Relationship Please Mark It As Best Answer If It Helps
Thank You!