Share This Post

NAV Updates

Enabling Dynamics NAV APIs

Microsoft exposes a Dynamics NAV APIs that makes possible to integrate with other services. To enable integration with these APIs, you must go through a few steps to enable the access for Dynamics NAV.

Dynamics NAV APIs

Dynamics NAV APIs

Enable access to the Dynamics NAV APIs

  1. Open Dynamics NAV Administration tool.
  2. Expand the OData Services tab, and select the Enable OData Services checkbox first, then select the Enable API Services checkbox.
  3. Check that the values for the OData Base URL and Port are entered correctly.
    When exposing the web service, you must open to the port for other consumers of your web service to access it. You can have your system administrator include the port through Windows Firewall on the computer running Microsoft Dynamics NAV Server. The default port for ODdata web services is 7048.
  4. In the Dynamics NAV, search for the API Setup and then select the related link.
  5. On the API Setup page, choose the Integrate Dynamics NAV APIs button.
    This will begin the process of populating all the integration tables with records for all the APIs. The process can take several minutes.

Depending on where you want to access the Dynamics NAV APIs from, you must specify the correct endpoint.

Endpoints for the APIs for Microsoft Dynamics NAV

Dynamics Navision exposes the API that creates it possible to integrate with other services. To enable integration with these Dynamics NAV APIs, you must go through a few steps to enable the access first.

Accessing the endpoint

Once you have the API access enabled, you can write code that integrates your web service or SaaS solution with Dynamics NAV APIs. Creating your integration through the API gives simple access to the helper functions in a single endpoint, providing you the simplified experience for creating a single app with integrations across multiple Microsoft products.

Dynamics NAV Microsoft Dynamics
NAV 2018
 Means of the   connection  Microsoft Graph   (coming)  Common endpoint service  Direct tenant Direct installation
 Usage  Production  Production  Rapid development and the testing only Production
 Endpoint https://
v1.0/<user domain name>/api/beta
Example: https://
OData base URL in installation:
<base URL>:<port>/v1.0/api/<API version>/
Example: https://
Must be exposed through a firewall.
 Availability  Enabled always  Always enabled  Always enabled Disabled by default.
Must be enabled by the administrator.
 Authentication  Azure Active Directory
 Azure Active Directory
 Basic authentication.
Username and web service
access key as the password.
Basic authentication.
Username and web service
access key
 as password.
 API/Data   access  Based on the user’s
 Based on the user’s
 Based on the user’s
Based on user’s
 API update   cycle  Monthly  Monthly  Monthly Hotfixes installed by partner
 Development   Instance  Sign up for a tenant  Sign up for a tenant  Sign up for a tenant

Error Codes

The below table lists the error codes for the various exceptions in the web service response for the ODataV4.

Error code categorization

The error codes in the below table can be divided into some categories and described as follows:

Category Description Resolution
 BadRequest_*  Will typically be an error in the forming of the request or an error accessing the service.  Resolve the bug in the form of the request.
 Authentication_*  An error authenticating to the service.  Attempt to use different credentials.
 Authorization_*  An authenticated identity does not have the correct permissions.  Attempt operation using different credentials.
 Internal_*  This is an internal error in the application on the server or data integrity issue. For example, the MS Dynamics Navision instance cannot communicate with the SQL Server.  Attempt the operation again.   Resolve data issues.
 Application_*  Typically an application logic error.  The request is made again with updated data.

Error codes

Exception Type  Error Message Error Code
 ODataArgumentException  An incompatible property definition
already exists for 'Allowed_Companies_0.Name'
 ODataNotFoundException  Bad Request – Error in query syntax  BadRequest_NotFound
 ODataNotFoundException  Expression expected at position 153 in   ‘(AAMkAGY2ZTQwODIwLTNkOWYtN
 ODataNotFoundException  ‘|’ or ‘,’ expected at position 3 in (GUID)  BadRequest_NotFound
 ODataResourceNotFoundException  Resource not found for the   segment 'OfficeAppResourceRegistrations'
multiple segment errors (Company, v1.0,   nativeInvoicingSalesInvoices,metadata,
nativeInvoicingItems, companies,company etc.)
 ODataInvalidOperationException  Control 'Last Date Modified' is read-only  BadRequest_InvalidOperation
 ODataBadRequestException  Invalid Request Body  BadRequest
 ODataBadRequestException  Unable to convert value to Date  BadRequest
 ODataBadRequestInvalidTokenException  Could not validate the client concurrency token required by the service.
Please provide a valid token in the client request.
 ODataBadRequestNullFieldException  Field 'taxable' must not be blank or empty.  BadRequest_RequiredParamNotProvided
 ODataConflictException  Another user has already changed the record.  Request_EntityChanged
 ODataMethodNotAllowedException 'POST' requests for 'companies' of EdmType 'Entity'
are not allowed within Microsoft Dynamics NAV OData web services.
 ODataNotImplementedException  Entity does not support bound actions  BadRequest_MethodNotImplemented
 NavCSideDataException  There is no Cust. Ledger Entry within the filter.  Internal_DataNotFoundFilter
 NavCSideRecordNotFoundException  The Acc. Sched. KPI Web srv. Setup does not exist.
Identification fields and values: Primary Key=”
 NavCSideValidateTableRelationException  The field Account No. of table Gen. Journal Line contains a value   (ABL001)
that cannot be found in the related table (Vendor).
 NavCSideException  Cannot establish a connection to the SQL Server/Database.  Internal_ServerError
 NavCSideDuplicateKeyException  The Attachment Entity Buffer already exists.
Identification fields and values: Document Id=
 NavCompanyNotFoundException  Cannot process the request because the default company cannot be   found.
You can specify a default company in the service configuration file,
or specify one for each tenant, or you can add a query string in the form of “company=[name]”.
You can see the available companies by accessing the default OData web service, Company.
 NavTenantNotAccessibleException  The tenant ‘msca1a7355t05263373’ is not accessible  Internal_TenantUnavailable
 NavNCLDialogException  You cannot delete Item 1000 because there is at least one
outstanding Sales Quote that includes this item.
 NavNCLDialogException  A customerNumber or a customerID must be provided.  Application_DialogException
 NavNCLDialogException  You may not enter numbers manually. If you want to enter numbers manually,
please activate Manual Nos. in No. Series FA.
 NavNCLDialogException  You are not allowed to apply and post an entry to an entry
with an earlier posting date.
 NavNCLDialogException  The “amount” should be a negative number.  Application_DialogException
 NavNCLEvaluateException  The value “Depreciation” cannot be evaluated into type Option.  Application_EvaluateException
 NavNCLStringLengthExceededException  The length of the string is 57, but it must be less than or
equal to 50 characters. Value: JACKSBORO PUMP & SPECIALTY
 NavNCLInvalidGuidFormatException  Invalid format of GUID string. The correct format of the GUID
string is: CDEF7890-ABCD-0123-1234-567890ABCDEF where
0-9, A-F symbolizes hexadecimal digits.
 NavNCLCallbackNotAllowedException  Microsoft Sync 365 for fin Data services attempted to issue a client  c   callback
to show a confirmation dialog box. We found an item with the description
 NavFilterException  The filter "='SELLACRE24_W%2FOORINGS'" is not valid for the No. field
on the Item table. The length of the string is 22, but it must be less than or equal to 20 characters.
 NavTestFieldException  Balance must be equal to ‘0’ in G/L Account: No.=10100.
Current value is ‘1,638.4’. Customer Posting Group must have a value
in Customer: No.=C00690. It cannot be zero or empty.
 NavTestFieldException  Customer Posting Group must have a value in Customer:
No.=C00690. It cannot be zero or empty.
 NavInvalidCredentialException  The server has rejected the client credentials  Authenciation_InvalidCredentials
 Any  Any  Unknown


Share This Post

Leave a Reply

Notify of
Skip to toolbar