Post

2 followers Follow
1
Avatar

In rules and automations allow to set field values to other fields values

Ashley Swartz

I would like to be able to create a rule where a value of a field is automatically populated by the value of a field in a related object (or a another field in the same object).

At the moment you are only able to set a field to a fixed value.

For example, if I have an Account object which has an Address field and a Contact field. I would like to define a rule that when I choose a contact in an Account record, then the address field of the account will be populated by the value of the address field of the contact.

Official comment

Avatar

This is quite easy to do with the API! If that's beyond you (and it's really probably not!) then I recommend posting in our FB group for a little help from one of our certified Experts.

If you're feeling up for it, here's a video explaining step by step how to use those tools to accomplish your goal: https://www.youtube.com/watch?v=Uijq4_tafIg

 

Landon Ray
Comment actions Permalink

Please to leave a comment.

5 comments

0
Avatar

Thanks for the tip! This worked indeed. And the video is very helpful too.

There is an issue with this approach that the update is not instantaneous. The data does update but asynchronously so I do not see it until I refresh or exit and re-enter to the contact I am editing.

Is there a way to force a refresh of the record I am editing? 

Ashley Swartz 0 votes
Comment actions Permalink
1
Avatar

If you need it done instantaneously, there is another approach that may work for you.

I would create a one-to-one relationship between accounts and contacts, call it primary contact.

That should be the contact you select when you want to copy over address information.

Then, in accounts, create a new field. It should be a related object data type field. Drill through your new one-to-one relationship by clicking the right arrow in the dropdown next to where it says primary contact, then select your address field.

Now, whenever you select a new primary contact, the address will populate immediately.

Landon Ray 1 vote
Comment actions Permalink
0
Avatar

Thanks again. I understand your suggestion and it will be useful in other situations we have.

But in this case it will not work for us. If I understand correctly, what you are suggesting means that the Account and Primary Contact share the same address fields in the DB (the account in your example does not really have an address of its own, only shows the contact's address). We need them to each have their own address because sometimes they differ. I just want the initial values to be populated since most often they are the same (or partially the same).

Ashley Swartz 0 votes
Comment actions Permalink
0
Avatar

That's right. So the first solution is your best bet.

 

Landon Ray 0 votes
Comment actions Permalink