You need to sign in to do that
Don't have an account?
rakesh konda
Trigger for updateing the contacts phone number automatically
Hello ,
Please help in wrting the trigger if the phone number in the account tab is changed by the user it must automatically update in the contact tab phone number also
Thanks & Regards,
Rakesh Konda
Please help in wrting the trigger if the phone number in the account tab is changed by the user it must automatically update in the contact tab phone number also
Thanks & Regards,
Rakesh Konda
Please try the following code :
Please let me know how this works for you, mark this as Solved if this helps you so that others can view it as a proper solution.
Thanks,
Apoorv
All Answers
Please try the following code :
Please let me know how this works for you, mark this as Solved if this helps you so that others can view it as a proper solution.
Thanks,
Apoorv
I am confused with the program there is no map in the program but you have used map.get(accid) can you please explain me the program
Thanks,
Rakesh
Using trigger.newMap in a Before Update trigger will let you access the new field values, i.e here trigger.newMap.get(acc.id).phone will give you new value of Phone field for that account, though it is not yet updated.
For more detail on trigger context variable refer to this link : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_context_variables.htm
Hope this helps!
Please mark this as Solved if your question was answered, so that others can view it as a proper solution.
Thanks,
Apoorv