You need to sign in to do that
Don't have an account?
Jaye Lowe
Update Account Email field based on Updated related Contact record
I have a directive to update an email field on the Account Record called Primary Email with the contents of the standard Email field on a related Contact Record Contact when a checkbox, Primary Client Referral, on the same contact record is checked. Not sure what the best...easiest way to accomplish this is. Any thoughts would be supremely helpul and immensely appreciated. Thanks in advance!
The easiest way and best way would be using flow because as it is configurable we can even deactivate or activate when ever needed in production also there is no need of test class for this to deploy to production.
Go to setup> search for flow and click on new flow and select record triggered flow.
The formula above is OR(ISNEW(), ISCHANGED({!$Record.Primary_Client_Referral__c}))
Now click on Plus sysmbol and add get record elements and fill details as below
Now click on Plus symbol and click on update records and fill the details as below.
Now Save the flow with some Name and activate it.The Flow will look as below.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
One was is from Trigger, here is the code. Please confirm the custom fields, I just fake the names per you description you may need to update those.
Hope this help
The easiest way and best way would be using flow because as it is configurable we can even deactivate or activate when ever needed in production also there is no need of test class for this to deploy to production.
Go to setup> search for flow and click on new flow and select record triggered flow.
The formula above is OR(ISNEW(), ISCHANGED({!$Record.Primary_Client_Referral__c}))
Now click on Plus sysmbol and add get record elements and fill details as below
Now click on Plus symbol and click on update records and fill the details as below.
Now Save the flow with some Name and activate it.The Flow will look as below.
Let me know if you face any issues.
If this solution helps, Please mark it as best answer.
Thanks,