We have opportunity as parent object and this parent object has several related list(lookup or masterdetail), whenever the fields in the child object is changed this should update the opportunity last modified custom field.

  • 2
    Have you tried to implement a trigger or a process builder?
    – Patlatus
    Aug 6 '18 at 10:14
  • How many fields you have child objects? suppose if you have 500 fields in child records. i will change 100 th field.then ?...Please explain requirement more clearly Aug 6 '18 at 10:27
  • Child object has many fields , whenever any field is changed in the child object this has to update the date field in the parent object.
    – Sriram
    Aug 6 '18 at 10:46
  • Which is the best way process builder or trigger considering in maintenance .
    – Sriram
    Aug 6 '18 at 10:46
  • Are there multiple sObject types amongst the children or are they all the same type?
    – CaptainHaZ
    Aug 6 '18 at 11:16

Ok, simplest option, i.e. no code, is a Process on each child object, fired when created or updated, Opportunity__c (lookup or master) is not null, update related object (Opportunity__c>>Custom_Last_Modified__c.

This would update the field on Opportunity each time one of the records is updated.

Other option is an Apex helper class and a trigger on each object to call the class, passing in the sObject variables.

I'd go for option 1 for a future perspective.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.