Dynamics 365 NAV ODATA Web Service Setup (Purchase Invoice)

This document is applicable for Dynamics 365 NAV. Gorilla Expense integrates with Dynamics 365 NAV using web services (ODATA services) provided by Dynamics 365 NAV. The first step is to mount the default Tenant (Provide Alternate Tenant ID if tenant already mounted) using NAV administration as shown in the below figure. 

Figure 1

Update web.config to allow hostname without port to tenant. Open the web.config file that is located in the physical path of the web application for the Microsoft Dynamics NAV Web client.

The path is %systemroot%\inetpub\wwwroot\[VirtualDirectoryName]\WebClient. For example, the folder for the default Microsoft Dynamics NAV Web client application is %systemroot%\inetpub\wwwroot\NAV\WebClient

Note: You must open the web.config file as an administrator or have permission to modify the file.

In the <system.webServer> element, find the <rule name="Hostname (without port) to tenant" enabled="false" stopProcessing="true"> element, and then change the value of the enabled attribute to true.

 

Check the OData base URL defined in NAV administration.

 

 

 

 

Figure 2

 

 

Figure 3

Once the above steps are completed, go to the following URL and ensure the page loads up. Replace <Company_Name> with the name of company catalog name in NAV, <Instance_Name> with the name of NAV instance (default is NAV) and replace localhost with the IP address/Machine name of the NAV server. This URL will be used within Gorilla Expense Integration Manager to connect to NAV. Provide this URL (shown below) to the Gorilla Expense implementation team.

http://localhost:7047/%3cInstance_Name%3e/OData.

Ex. http://gorilla365fin.eastus.cloudapp.azure.com:7048/NAV/OData/

On opening on the URL in a web browser, the following page should show up. This page should open on all PCs (in Accounts Payable department) that will be used to export expense reports to NAV using Integration Manager

If the URL does not open, please check if the default port 7047 is changed in your environment and/or also restart “Microsoft Dynamics NAV Server” Service, by going to Administrative tools ->Services.

Gorilla Expense Integration Manager Setup

 

Download and install Integration Manager from the following URL –

https://www.gorillaexpense.info/install/publish.htm

Once installed, select MS NAV in the Type dropdown on the top section on the login page and login using Gorilla Expense Admin username and password. Enter the following URL of Gorilla Expense Service in the Login URL field. For non-USA based customers, this value can be found in the Admin Application Access Instructions Document (Integration App Section) provided to you after the Gorilla Expense setup is completed. 

https://www.gorillaexpense.info/Gorillapro/service

Once logged in, select File - > Export Expense Reports. All the expenses available for exporting to Dynamics 365 NAV (Manager Approved Expenses) will show up (if any). Click on settings button available on the right top corner – a new window called “NAV Mappings” shows up (see screenshot below). On this window, you can define what fields are to be mapped to the Purchase Invoice Line Description field. Also, on this screen you have to enter the Dynamics 365 NAV Connection URL mentioned in the NAV Web Service Setup section -

https://gorilla365fin.eastus.cloudapp.azure.com:7047/NAV/WS/CRONUS%20US/Page/PurchaseInvoice?tenant=default

If you check the “Get Connection URL from Company Profile”, then it is not required to enter the above URL on the “NAV Mappings” screen, but you will instead have to login to the web application and enter it on the company master (Masters->Company) when logged in as admin. This provision is provided especially for customers who have multiple NAV company databases. However, this setting can be used for single NAV DB as well. 

Check the “Post To Purchase Invoice” checkbox, and if applicable, map the desired dimensions after consulting with Gorilla Expense team. You need not enter the user/password information. Check the radio button ‘Dynamics 365’ and radio button ‘ODATA’ in the Integration Type section.

 You have to make sure the user using Integration App is setup in NAV as Super Accounting User using the user's Windows ID (Not NAV ID). And then click Save. Once the settings are saved, you can are ready to push expenses to NAV. 

Vendor Setup - Typical Errors

  1. Vendor XYZ does not exist – Make sure the vendor exists in Dynamics 365 NAV
  2. There is no Currency Exchange Rate within the filter – On the vendor card, please make sure the currency code field under “Foreign” tab is empty. Also, make sure the posting date field under “Payables Setup” is set to “Work Day”