NAV Web Service Setup (Purchase Invoice)

This document is applicable for NAV 2017 and above. Gorilla Expense integrates with NAV using web services provided by NAV. The first step is to create the “Purchase Invoice” web service in NAV. Web service setup can be accessed in NAV by under Administration -> IT Administration->Services -> Web Services

Figure 1

Create two new services, by selecting Object Type as “Page” and Object Id as 51 for Purchase Invoice and Object Id as 26 for Vendor Card-

Figure 2


Make sure the new web service is called PurchaseInvoiceSer2017 and published checkbox is checked as shown below –

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 DynamicsNAV) 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 and the one for vendor card (shown below) to the Gorilla Expense implementation team.

http://localhost:7047/%3cInstance_Name%3e/WS/%3cCompany_Name%3e/Page/PurchaseInvoiceSer2017

On opening on the URL in 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

Repeat the above procedure for Object ID 26 Vendor Card, by creating a service called “VendorCardSer2017” as shown in Figure 3 above. Make sure the URL can be accessed at -

http://localhost:7047/<Instance_Name>/WS/<Company_Name>/Page/VendorCardSer2017

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 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 NAV Connection URL mentioned in the NAV Web Service Setup section -

http://localhost:7047/DynamicsNAV/WS/<Company_Name>/Page/PurchaseInvoiceSer2017

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. You have to make sure the user using Integration App is setup in NAV as Super Accounting User using the users 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 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”