Saturday, April 25, 2020

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


Hi Readers,

In this blog, we will look into the Integration of NAV and CRM, wherein we'll Create Function in Microsoft Dynamics to pass data to 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.

First, we'll require a WCF Service which will have functions to accept data from NAV and pass it to CRM. Then, we'll have to add this WCF Services as a dll in NAV. Add dll to NAV

Prerequisites: 



  • WCF Service as dll in NAV
  • A CRM Sandbox Environment 
  • Analysis of the fields and entities that you want to Integrate. say, Name of NAV Customer to Integrate with  Name of CRM Account. 

Note: You should know the Methods of WCF Service and Data Source Entities and their properties. Contact the .NET Team who created the Service. If you yourself want to know how to create this WCF Service for Integration, Please let me know and we can have a blog for that!

P.S: The best way to make this Integration a success is to have proper communication within the team, .net team and CRM Team working together.

Now, lets get started!

As a scenario, we will see how to Integration NAV Item Master to CRM Products.

Flow: NAV ==> CRM

1. Create a Codeunit in NAV as shown below:


Note: Publish this Codeunit in Web Services. The SOAP URL generated will be added in the WCF Service as a Wb Reference so that it's methods can be accessed to the WCF Service.

2. Create two Functions.
    a. GetItem - Get current Rec of Item.


wherein,
Product is the Data Source Entity from the WCF Service dll and we added it as a DotNet  variable. (Check my latest blog to know about it more)

UoM is a new field in UoM Table to store CRM GUID.
 
     b. CreateProductFromItem - Pass NAV Data to CRM


wherein, CreateUpdateProductFromItem is a WCF method.

    c. Call CreateUpdateProductFromItem on OnValidate(), OnInsert() or whenever you want to trigger this Item to go to CRM.

For this Integration to work, CRM will have to call the WCF method to which you have passed the NAV Data. In this case,

Perform Integration of other Entities by following the same Process when you want to Pass any data from NAV! You can also have a bi-directional Integration, depending on the requirement.


The next part is coming soon wherein we'll Create Function in Microsoft Dynamics to receive data from Microsoft Dynamics CRM through a WCF Service. Stay tuned!

Part 2 is available now! 

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!

Disclaimer: copyright © All Rights Reserved

3 comments:

  1. Excellent work, will share this with our Technical team. In today's world everyone busy with their own work and avoid sharing knowledge,skills. They keep it within themselves, thinking that, if they share it, their value will reduce drastically in company grades. I like your blogs, specially sharing..spreading your knowledge and work to mass audience.
    Thanks and regards,
    Sandeep R Pal
    Manager - Sales & Business Development
    Mumbai

    ReplyDelete
    Replies
    1. Thanks a lot for your kind words, sir. I hope this will be helpful and reach out to people. Please keep on following the blog and share it in your network. Have a great day :)

      Delete
  2. Hi Jyotsna! I have gone through many blog along with your "Integrating Dynamics 365 Field Service" it is unique as I am also provide the same service.

    We just released a major update to our Software for field service management; completely revamping the reporting tool and a brand new mobile app.

    ReplyDelete