Tuesday, April 28, 2020

Integrating Dynamics 365 Field Service with Microsoft Dynamics NAV 2018 using WCF Part 2

Hi Readers,
This is the continuation of previous blog! Don't forget to check that out before moving forward! Previous Blog

In this blog,  we'll Create Function in Microsoft Dynamics to receive data from Microsoft Dynamics CRM  through a WCF Service. 

Know more about Integration in my other blog Dynamics NAV and Dynamics 365 Integration to get more insides.

Now, lets get started!



As a scenario, we will see how to Integration CRM Accounts to NAV Customers.

Flow: CRM ==> NAV

We will continue using the same Codeunit that we had created in Part 1

1. Create a Function as shown below:




wherein, Customer is the Data Source Entity from the WCF Service dll and we added it as a DotNet                   variable.
               jsonCust is what we get from WCF
              CrmId is a new field in Customer(18) Table to store CRM GUID.

Note: The first line of the function couldn't fit in the Image, so here it is:
Customer := Serializer.DataContractJsonSerializer(GETDOTNETTYPE(Customer)).ReadObject(MemStream.MemoryStream(Encoding.UTF8.GetBytes(FORMAT(jsonCust))));

For this Integration to work, CRM will have to call the WCF method and WCF method will trigger NAV method.

You can perform Update and delete operations in a similar faction. Perform Integration of other Entities by following the same Process when you want to receive any data from CRM! You can also have a bi-directional Integration, depending on the requirement.

I enjoyed the whole process of Integration, from learning to Implementing!
I hope this blog was helpful and knowledgeable to you as well. Please let me know if you want more blogs like these!

Write your suggestions in the comment section.
You can also email me at: jyotsnaoberainav@gmail.com

Also visit my website JONAV if you need help with any NAV/BC Services!

Thank you!

No comments:

Post a Comment