Copy Accounts address to Contacts address records

3 December 2014

In this example we show how you can use Data Sync to copy the address details from the parent account record to the contact record in Dynamics CRM.

Within Dynamics CRM the parentcustomerid field defines the relationship to the parent Account entity record. What we need is to setup Data Sync to pull in the details of the Account record via a Lookup.

First setup Data Sync so that the Source and Target are mapped to the same contact entity. Then create a Filter to only return the rows where we have a parentcustomerid value.

Project

Add a Filter to exclude rows where the parentcustomerid is NULL i.e. NOT(ISNULL(parentcustomerid))

Filter

We also need to disable DELETE and ADD actions on the Target since we only want to UPDATE the records. (The filter may exclude rows which would create DELETE actions on the target an alternative is to use the SyncAtoBIncremental mode in Project Settings).

Disable ADD and DELETE

Next we add a Lookup on parentcustomerid to account.accountid

Lookup

Now we just map the Account Lookup Column values to the Contact record.

Mapping

When we Compare A->B we now get an UPDATE action to copy over the values from the Account record to the Contact Record.

Compare

| |