function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ckellieckellie 

Change the Value of a Phone Field based on a Lookup Field

I am needing to change the value of a Phone formatted field when the contact name changes. In other words, when I select the contact name, thwe contact's phone number will be populated. How do I get started?

Best Answer chosen by Admin (Salesforce Developers) 
srisomsrisom

Trigger on Contact that runs before insert and update.

For inserts and updates (where the contact name has changed), query/set the phone number you want in Trigger.new for that field and that should be that.

All Answers

srisomsrisom

Trigger on Contact that runs before insert and update.

For inserts and updates (where the contact name has changed), query/set the phone number you want in Trigger.new for that field and that should be that.

This was selected as the best answer
ckellieckellie
Perfect. Thank you