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