You need to sign in to do that
Don't have an account?
aaryansri
using trigger copy child object picklist value to parent object septrated by comma
Hi
Opportunity is parent object and Approvel by source is a child object. Under one parent object multiple child objects are there. Child object having "source of child" picklist field values are(CCI,Risk,Revenu,SD). Parent object also having "source" it is text field.
One parent is having multiple childs all the "source of child" values should update to parent "source" field seprated by comma. Dupplictes should not be repeat and even we update child "source of child" that should update in related parent "source" text filed and even if we deleted child record parent filed should based on that.
Please help me on the above trigger.
Opportunity is parent object and Approvel by source is a child object. Under one parent object multiple child objects are there. Child object having "source of child" picklist field values are(CCI,Risk,Revenu,SD). Parent object also having "source" it is text field.
One parent is having multiple childs all the "source of child" values should update to parent "source" field seprated by comma. Dupplictes should not be repeat and even we update child "source of child" that should update in related parent "source" text filed and even if we deleted child record parent filed should based on that.
Please help me on the above trigger.
Refer below working code:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
All Answers
you can refer below code:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
Thanks for the responce. When trying the above code in line no 9 getting error of "Incompatible value type String for MAP<Id,SET<String>> at line 9 column 13". Can you please rectify that error and revert back what changes to be done.
I tried above code it is not storing multiple vaues in parent field .when creating 2 nd child record it overwriting the 1st value in parent field .
Refer below working code:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
Thanks for help code is working as required.
Thanks
Ashok