0

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.

6
  • 2
    Have you tried to implement a trigger or a process builder?
    – Patlatus
    Commented Aug 6, 2018 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
    – Annappa PH
    Commented Aug 6, 2018 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
    Commented Aug 6, 2018 at 10:46
  • Which is the best way process builder or trigger considering in maintenance .
    – Sriram
    Commented Aug 6, 2018 at 10:46
  • Are there multiple sObject types amongst the children or are they all the same type?
    – CaptainHaZ
    Commented Aug 6, 2018 at 11:16

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .