You need to sign in to do that
Don't have an account?
Ab
Trigger to Update child based on value of parent
Hello,
I have a Custom_picklist__c on Parent_Obect__c with value1 and Value2
I have a child object child_Custom__c i have check box on this object Custom_checkbox1__c
Parent_Obect__c
Custom_picklist__c (value1, Value2)
child_Custom__c
Custom_checkbox1__c
Usecase:
On creation of new record of child_Custom__c the field Custom_checkbox1__c will be if Custom_picklist__c = Value1
How can implement a trigger for the same ?
thank you for suggestion
I have a Custom_picklist__c on Parent_Obect__c with value1 and Value2
I have a child object child_Custom__c i have check box on this object Custom_checkbox1__c
Parent_Obect__c
Custom_picklist__c (value1, Value2)
child_Custom__c
Custom_checkbox1__c
Usecase:
On creation of new record of child_Custom__c the field Custom_checkbox1__c will be if Custom_picklist__c = Value1
How can implement a trigger for the same ?
thank you for suggestion
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
@Khan, just a small correction :-)
Use the above trigger with only Before Insert event and make the listIds as Set instead of list.
Thank You,
Rajesh Adiga P.