---
title: "D365 Sales Contact -> MS Dynamics BC Contact Add/Update"
description: "D365 Sales Contact -> MS Dynamics BC Contact Add/Update"
keywords: "D365 Sales Contact MS Dynamics BC Contact"
url: "https://myrapidi.com/wiki/d365_sales_contact_ms_dynamics_bc_contact_add_update"
locale: "en"
published: "2024-04-24T10:35:00Z"
modified: "2024-04-26T15:06:36Z"
---

This transfer will transfer new and updated D365 Sales contacts into MS Dynamics Business Central Contacts. All mappings are either 1:1 or additional lookups have been created. However, there are specific mappings where you have more than 1 option to map the indicated fields:

1. Address1\_country -\> Country\_Region\_Code 

| **D365 Sales Field** | **MS Dynamics Business Central Field** |
| --- | --- |
| ##LSLOOKUP('COUNTRIES'+'#REVERSE',"address1\_country") | Country\_Region\_Code |
| address1\_country | Country\_Region\_Code |

_Note:Address1\_country is a free text field in D365 Sales. It can be turned into a picklist by updating the current setup ( Settings -\> Customization -\> Entities -\> Accounts). In Business Central, the Country\_Region\_Code is a picklist and only the available options will be allowed._

  - 1:1 mapping if both address1\_country and Country\_Region\_Code contain the same information, which is the country code ( ISO Code).
  - Formula ##LSLOOKUP('COUNTRIES'+'#REVERSE',"address1\_country") which will retrieve the country code from a predefined static lookup table called COUNTRIES.

2. Owner ID -\> Salesperson Code

| **D365 Sales Field** | **MS Dynamics Business Central Field** |
| --- | --- |
| ##LSLOOKUP('%%LSUSER%'+'#REVERSE',"\_ownerid\_value") | Salesperson\_Code |
| ##IF(EQUALS(\_ownerid\_value,''),SKIPFIELD(),DBLOOKUP('SOURCEDS','systemuser','systemuserid',"\_ownerid\_value",'nickname'))) | Salesperson\_Code |

_Note:The owner ID field is a GUID field in D365 Sales and it will need to be converted to the Business Central Salesperson Code._

  - Formula ##LSLOOKUP('%%LSUSER%'+'#REVERSE',"\_ownerid\_value") where the Salesperson\_Code is retrieved from a dynamic lookup table and the field is populated in Business Central.
  - Formula ##IF(EQUALS(\_ownerid\_value,''),SKIPFIELD(),DBLOOKUP('SOURCEDS','systemuser','systemuserid',"\_ownerid\_value",'nickname')) where a lookup is made on the destination system ( D365 Sales) and the Salesperson\_Code is retrieved from the field called nickname. Note: The field nickname will have to be used to populate it with the salesperson’s code ( the same code used in Business Central).
