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
LStraubLStraub 

Is there any way to sync Contact Address to the Account Address on a per contact basis

Basicallly some kind of workflow or control that says if this check box is checked then make sure the address for this contact always matches the Account Billing addresss or whatever?
werewolfwerewolf
Sure, you can make an Apex trigger that looks for that checkbox and either throws a validation exception if the addresses don't match or copies the address over from the account.
champ_vimalchamp_vimal

Yes, via workflow you can do it. I tried on my system and it works.

 

I created a checkbox named 'Want Address same as Account address?'.

 

Then I created workflow for Mailing city and Mailing country fields:'Address same as Account'.

 

Rule Criteria: if the checkbox value is true, perform 2 workflow actions(Field updates).

 

1) Update Contact Mailing City : formula to collect Account Billing City

2) Update Contact Mailing Country : formula to collect Account Billing Country

 

This lets you perform what you want. However, when you click the check box and change the city/country value to some other values, it just takes the value same as that of account record fields. I am not validating it as from what I think, if the checkbox is checked then whatever you type in the address fields, it gonna take the values as per workflow actions. Hence, I think there is no need to have validation rules, the checkbox field is of utmost importance here.

 

 

Thanks,

 

Vimal
HeywatchitHeywatchit
Is there a simple way to populate houshold/account records with the address from an asscoiated contact?