<turbo-stream action="update" target="wiki_card"><template>
<h1>D365 Sales Contact -&gt; MS Dynamics BC Contact Add/Update</h1>
<p>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:</p>
<ol>
<li>Address1_country -&gt; Country_Region_Code </li>

<table>
<thead>
<tr>
<td><span><strong>D365 Sales Field</strong></span></td>
<td><span><strong>MS Dynamics Business Central Field</strong></span></td>
</tr>
</thead>

<tbody>
<tr>
<td>##LSLOOKUP('COUNTRIES'+'#REVERSE',"address1_country")</td>
<td>Country_Region_Code</td>
</tr>
<tr>
<td>address1_country</td>
<td>Country_Region_Code</td>
</tr>
</tbody>
</table>

<p><i>Note:Address1_country is a free text field in D365 Sales. It can be turned into a picklist by updating the current setup ( Settings -&gt; Customization -&gt; Entities -&gt; Accounts). In Business Central, the Country_Region_Code is a picklist and only the available options will be allowed. </i></p>
<ul>

<li>1:1 mapping if both address1_country and Country_Region_Code contain the same information, which is the country code ( ISO Code).</li>
<li>Formula ##LSLOOKUP('COUNTRIES'+'#REVERSE',"address1_country") which will retrieve the country code from a predefined static lookup table called COUNTRIES.</li>
</ul>
<li>Owner ID -&gt; Salesperson Code</li>
<table>
<thead>
<tr>
<td><span><strong>D365 Sales Field</strong></span></td>
<td><span><strong>MS Dynamics Business Central Field</strong></span></td>
</tr>
</thead>
<tbody>
<tr>
<td>##LSLOOKUP('%%LSUSER%'+'#REVERSE',"_ownerid_value")</td>
<td>Salesperson_Code</td>
</tr>
<tr>
<td>##IF(EQUALS(_ownerid_value,''),SKIPFIELD(),DBLOOKUP('SOURCEDS','systemuser','systemuserid',"_ownerid_value",'nickname')))</td>
<td>Salesperson_Code</td>
</tr>
</tbody>
</table>

<p><i>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.</i></p>
<ul>

<li>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.</li>
<li>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).</li>
</ul></ol>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='D365 Sales Contact -> MS Dynamics BC Contact Add/Update' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='D365 Sales Contact MS Dynamics BC Contact' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>D365 Sales Contact -> MS Dynamics BC Contact Add/Update - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
