NAV 2009 R2 Setup

In this how-to we will go through how you setup a NAV 2009 R2 based remote system for integration with a Dynamicweb solution.

This covers the following:

The install procedure involves:

  • Installing the code unit in NAV and Activating the DWWebService
  • Activating the Dynamics NAV Service in Windows

Appendix A outlines standard mappings between NAV 2009 R2 data and Dynamicweb data.

To install the code unit in NAV:

  • Open object designer
  • While the object designer is open, pick files->Import
  • Find the .fob file
  • Click open
  • Click no - this opens the import worksheet window
  • Click ok to import the codeunit
  • Click ok

Codeunit 50100 - "DW WebService" should now be installed.

Select it and click Run to activate the web service.

To activate the Dynamics NAV service in your Windows services:

  • Open control panel
  • Open administrative tools
  • Open Services
  • Find the one called “Microsoft Dynamics NAV Business Web Services”
  • Start it – and consider making it start automatically on boot

Your NAV web service should now be running – check it by accessing http://localhost:7047/DynamicsNAV/WS/Services.

Currently, only the user which installed NAV has access to the web service. Consider setting up a user specifically for accessing the web service, with the relevant rights and permissions in windows and NAV.

Below, you can find a collection of default mappings between NAV 2009 R2 data and Dynamicweb data.

NAV Table

To

DW XML

Customer."No."

->

<column columnName="AccessUserExternalID">

Customer."No."

->

<column columnName="AccessUserCustomerNumber">

Customer.Name

->

<column columnName=" Customer.Name ">

Customer."E-Mail"

->

<column columnName=" AccessUserEmail ">

Customer."Phone No."

->

<column columnName="AccessUserPhone">

Customer."Fax No."

->

<column columnName=" AccessUserFax ">

Customer.Address

->

<column columnName="AccessUserAddress">

Customer."Address 2"

->

<column columnName="AccessUserAddress2">

Customer."Post Code"

->

<column columnName="AccessUserZip">

Customer.City

->

<column columnName="AccessUserCity">

Customer."Country/Region Code"

->

<column columnName="AccessUserCountry">

Customer.Blocked

->

<column columnName="AccessUserActive">

Customer."Home Page"

->

<column columnName="AccessUserWeb">

NAV Table

To

DW XML

country.Code

->

<column columnName="CountryCode2">

NAV Table

To

DW XML

currency.Code

->

<column columnName="CurrencyCode">

currency.Description

->

<column columnName="CurrencyName">

Language.GetUserLanguage

->

<column columnName=" CurrencyLanguageID">

ROUND(100 / “Currency Exchange Rate”.ExchangeRate(TODAY, currency.Code), 1)

->

<column columnName="CurrencyRate ">

NAV Table

To

DW XML

Language.Code

->

<column columnName="LanguageID">

Language.Code

->

<column columnName="LanguageCode2">

Language.Name

->

<column columnName="LanguageName">

NAV Table

To

DW XML

vendor."No."

->

<column columnName="ManufacturerID">

vendor.Name

->

<column columnName="ManufacturerName">

vendor.Address

->

<column columnName="ManufacturerAddress">

vendor."Post Code"

->

<column columnName="ManufacturerZipCode">

vendor.City

->

<column columnName="ManufacturerCity">

vendor."Country/Region Code"

->

<column columnName="ManufacturerCountry">

vendor."Phone No."

->

<column columnName="ManufacturerPhone">

vendor."Fax No."

->

<column columnName="ManufacturerFax ">

vendor."E-Mail"

->

<column columnName="ManufacturerEmail">

vendor."Home Page"

->

<column columnName="ManufacturerWeb">

(EcomStockUnit)

NAV Table

To

DW XML

item."No."

->

<column columnName=" StockUnitProductID ">

itemvariants.Code

->

<column columnName=" StockUnitVariantID">

STRSUBSTNO('Unit_%1',item."Base Unit of Measure")

->

<column columnName=" StockUnitID">

'1'

->

<column columnName="StockUnitQuantity">

 

(EcomVariantsOptions)

NAV Table

To

DW XML

STRSUBSTNO('Unit_%1',”Unit of Measure”.Code)

->

<column columnName="VariantOptionID ">

“Unit of Measure Translation”."Language Code"

->

<column columnName="VariantOptionLanguageID ">

'NavUnits'

->

<column columnName="VariantOptionGroupID ">

Unit  Of Measure Translation.Description

->

<column columnName="VariantOptionName">

 

(EcomVariantGroups)

NAV Table

To

DW XML

'NavUnits'

->

<column columnName="VariantGroupID">

Language.Code

->

<column columnName="VariantGroupLanguageID ">

'DW_Units'

->

<column columnName="VariantGroupName">

''

->

<column columnName="VariantGroupLabel">

'true'

->

<column columnName="VariantGroupUnit">

NAV Table

To

DW XML

item."No."

->

<column columnName="ProductID">

Language (variable) or Languages.GetUserLanguage

->

<column columnName="ProductLanguageID">

Variant (variable) or “ ”

->

<column columnName="ProductVariantID">

item."No."

->

<column columnName="ProductNumber">

description1 (variable)

->

<column columnName="ProductName">

Description2 (variable)

->

<column columnName=" ProductShortDescription">

item."Unit Price"

->

<column columnName=" ProductPrice">

item.Inventory

->

<column columnName=" ProductStock">

item."Net Weight"

->

<column columnName="ProductWeight">

item."Unit Volume"

->

<column columnName="ProductVolume">

item."Vendor No."

->

<column columnName="ProductManufacturerID">

item.Blocked

->

<column columnName="ProductActive">

Variantcount (variable)

->

<column columnName="ProductVariantCounter">

STRSUBSTNO('Unit_%1',item."Base Unit of Measure")

->

<column columnName="ProductDefaultUnitID">

NAV Table

To

DW XML

item."No."

->

<column columnName="ProductID">

Variant (variable)

->

<column columnName="ProductVariantID ">

item."No."

->

<column columnName="ProductNumber">

item.Description or “Item Variants”.Description

 

<column columnName="ProductName">

TempSalesPrice (variable)

 

<column columnName="ProductPrice">

item.Inventory

 

<column columnName="ProductStock">

Currency.Code

 

<column columnName="ProductCurrencyCode">

NAV Table

To

DW XML

'TRUE' or ‘FALSE’

->

<column columnName="OrderCreated">

“Sales Header”."No."

 

<column columnName="OrderID">

“Sales Header”."Currency Code"

 

<column columnName="OrderCurrencyCode">

“Sales Header”."Order Date"

 

<column columnName="OrderDate">

“Sales Header”."Payment Method Code"

 

<column columnName="OrderPaymentMethodName">

“Sales Header”."Shipment Method Code"

 

<column columnName="OrderShippingMethodName">

“Sales Header”."Sell-to Customer Name"

 

<column columnName="OrderCustomerName">

“Sales Header”."Sell-to Address"

 

<column columnName="OrderCustomerAddress">

“Sales Header”."Sell-to Address 2"

 

<column columnName="OrderCustomerAddress2">

“Sales Header”."Sell-to City"

 

<column columnName="OrderCustomerCity">

“Sales Header”."Sell-to Country/Region Code"

 

<column columnName="OrderCustomerCountryCode">

''

 

<column columnName="OrderCustomerEmail">

''

 

<column columnName="OrderCustomerFax">

''

 

<column columnName="OrderCustomerPhone">

“Sales Header”."Ship-to Post Code"

 

<column columnName="OrderCustomerZip">

“Sales Header”."Ship-to Name"

 

<column columnName="OrderDeliveryName">

“Sales Header”."Ship-to Address"

 

<column columnName="OrderDeliveryAddress">

“Sales Header”."Ship-to Address 2"

 

<column columnName="OrderDeliveryAddress2">

“Sales Header”."Ship-to City"

 

<column columnName="OrderDeliveryCity">

“Sales Header”."Ship-to Country/Region Code"

 

<column columnName="OrderDeliveryCountryCode">

''

 

<column columnName="OrderDeliveryEmail">

''

 

<column columnName="OrderDeliveryFax">

''

 

<column columnName="OrderDeliveryPhone">

“Sales Header”."Ship-to Post Code"

 

<column columnName="OrderDeliveryZip">

Order_OrderPriceWithVAT (variable)

 

<column columnName="OrderPriceWithVAT">

Order_OrderPriceWithoutVAT (variable)

 

<column columnName="OrderPriceWithoutVAT">

Order_OrderPriceVAT (variable)

 

<column columnName="OrderPriceVAT">

Order_OrderSalesDiscount (variable)

 

<column columnName="OrderSalesDiscount">

''

 

<column columnName="OrderShippingFee">

NAV Table

To

DW XML

salesLine."No."

->

<column columnName="OrderLineProductNumber">

salesLine."Variant Code"

 

<column columnName="OrderLineProductVariantID">

salesLine."Line No."

 

<column columnName="OrderLineParentLineID">

'3' or '0'

->

<column columnName="OrderLineType">

'1' or salesLine.Quantity

 

<column columnName="OrderLineQuantity">

salesLine."Line Discount Amount" or TempWithWAT (variable)

 

<column columnName="OrderLinePriceWithVAT">

TempWithoutWAT (variable) or salesLine."Line Discount Amount"

->

<column columnName="OrderLinePriceWithoutVAT">

salesLine."Line Discount %"

 

<column columnName="OrderLineDiscountPercentage">

(TempWithWAT-TempWithoutWAT) (variable)

 

<column columnName="OrderLinePriceVAT">

salesLine."VAT %"

->

<column columnName="OrderLinePriceVATPercent">

salesLine."VAT %"

 

<column columnName="OrderLineUnitPriceVATPercent">

salesLine."Line No."

 

<column columnName=" OrderLineID">

salesLine."Unit Price" or salesLine."Unit Price" * (1 + (salesLine."VAT %" / 100))

->

<column columnName=" OrderLineUnitPriceWithVAT">

salesLine."Unit Price" / (1 + (salesLine."VAT %" / 100)) or salesLine."Unit Price"

 

<column columnName="OrderLineUnitPriceWithoutVAT">

(Sales Header)

DW XML

To

NAV Table

<column columnName="OrderCustomerAccessUserExternalId">

->

“Sales Header”."Sell-to Customer No."

<column columnName="OrderCustomerName">

 

“Sales Header”. Sell-to Customer Name"

<column columnName="OrderCustomerAddress">

 

“Sales Header”. Sell-to Address"

<column columnName="OrderCustomerAddress2">

 

“Sales Header”."Sell-to Address 2"

<column columnName="OrderCustomerZip">

 

“Sales Header”."Sell-to Post Code"

<column columnName="OrderCustomerCity">

 

“Sales Header”."Sell-to City"

<column columnName="OrderDeliveryName">

 

“Sales Header”."Ship-to Name"

<column columnName="OrderDeliveryAddress">

 

“Sales Header”."Ship-to Address"

<column columnName="OrderDeliveryAddress2">

 

“Sales Header”."Ship-to Address 2"

<column columnName="OrderDeliveryZip">

 

“Sales Header”."Ship-to Post Code"

<column columnName="OrderDeliveryCity">

 

“Sales Header”."Ship-to City"

 

(Sales Line)

DW XML

To

NAV Table

<column columnName="OrderLineProductID">

->

“Sales Line”."No."

<column columnName="OrderLineQuantity">

 

“Sales Line”.Quantity

<column columnName="OrderLinePriceWithoutVAT">

 

“Sales Line”."Unit Price"

<column columnName="OrderLineUnitPriceWithoutVAT">

 

“Sales Line”."Line Discount Amount"

(Sales Header)

DW XML

To

NAV Table

<column columnName="OrderCustomerAccessUserExternalId">

->

“Sales Header”."Sell-to Customer No."

<column columnName="OrderCustomerName">

 

“Sales Header”. Sell-to Customer Name"

<column columnName="OrderCustomerAddress">

 

“Sales Header”. Sell-to Address"

<column columnName="OrderCustomerAddress2">

 

“Sales Header”."Sell-to Address 2"

<column columnName="OrderCustomerZip">

 

“Sales Header”."Sell-to Post Code"

<column columnName="OrderCustomerCity">

 

“Sales Header”."Sell-to City"

<column columnName="OrderDeliveryName">

 

“Sales Header”."Ship-to Name"

<column columnName="OrderDeliveryAddress">

 

“Sales Header”."Ship-to Address"

<column columnName="OrderDeliveryAddress2">

 

“Sales Header”."Ship-to Address 2"

<column columnName="OrderDeliveryZip">

 

“Sales Header”."Ship-to Post Code"

<column columnName="OrderDeliveryCity">

 

“Sales Header”."Ship-to City"

<column columnName="OrderCurrencyCode">

 

“Sales Header”."Currency Code"

(Sales Header)

DW XML

To

NAV Table

<column columnName="AccessUserName">

->

Customer.Name

<column columnName="AccessUserEmail ">

 

Customer."E-Mail"

<column columnName="AccessUserPhone">

 

Customer."Phone No."

<column columnName="AccessUserFax">

 

Customer."Fax No."

<column columnName="AccessUserAddress">

 

Customer.Address

<column columnName="AccessUserAddress2">

 

Customer."Address 2"

<column columnName="AccessUserZip">

 

Customer."Post Code"

<column columnName="AccessUserCity">

 

Customer.City

<PutUsers GeneralBusinessPostingGroup="Denmark" VatBusinessPostingGroup="Denmark" CustomerPostingGroup="Denmark">

 

Customer."Gen. Bus. Posting Group"

<PutUsers GeneralBusinessPostingGroup="Denmark" VatBusinessPostingGroup="Denmark" CustomerPostingGroup="Denmark">

 

Customer."VAT Bus. Posting Group"

<PutUsers GeneralBusinessPostingGroup="Denmark" VatBusinessPostingGroup="Denmark" CustomerPostingGroup="Denmark">

 

Customer."Customer Posting Group"