Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products Build your own agents CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 2 min read

Outlook Contact Field Synchronization with Dynamics AX 2012 R2


I recently ran across the need to expand fields that automatically sync from Dynamics AX 2012 R2 to Outlook contact records. It is a very time consuming and labor intense process to manually map fields on each Contact record selected for Outlook Synchronization.

Here is the scenario:

1. Business Fax is not a field synchronized from AX to Outlook through standard out-of-the-box mapping.

2. By default, the Outlook Contact card displays the Primary Number selected in AX but the Business Telephone Number field is not populated on the Outlook contact form. I want the Primary Telephone to show both on the Outlook Contact card and form as the Business Telephone Number.

 

Solution:

The automatic field mapping can be customized by modifying the createFieldMapping method under the smmContactPersonSynchronizationFieldMapping table.

// Primary phone  – modified so Primary Phone field in AX syncs to the Business Telephone on the Outlook record
        if (syncDirectionValid(smmOutlookContactFields::PrimaryTelephoneNumber))
        {
            contactInfo = DirParty::primaryElectronicAddress(contactPersonEntity.getPartyRecId(), LogisticsElectronicAddressMethodType::Phone);
            if (contactInfo)
            {
                _contactFieldRecordMap.insert(smmOutlookContactFields::BusinessTelephoneNumber, contactInfo);
            }
        }

 // Business Fax – this section added so Business Fax will automatically sync with the corresponding Outlook contact field
        if (syncDirectionValid(smmOutlookContactFields::BusinessFaxNumber))
        {
            contactInfo = DirParty::primaryElectronicAddress(contactPersonEntity.getPartyRecId(), LogisticsElectronicAddressMethodType::Fax);
            if (contactInfo)
            {
                _contactFieldRecordMap.insert(smmOutlookContactFields::BusinessFaxNumber, contactInfo);
            }
        }

End Result:


 

Of course, this may not meet your specific needs but it provides an example of what is possible through a little customization.

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.