Skip to main content What is Dynamics 365? Guided tours Customer stories Try our products CRM ERP Sales Service Sales Customer Insights Customer Service Contact Center Field Service Supply Chain Management Commerce Finance Project Operations Human Resources Business Central Pricing Business application topics Training & certifications Migrate to the cloud Documentation Events Dynamics 365 Blog Product updates Onboarding and implementation Community Find a partner Software Development Companies Partner resources Microsoft Marketplace Product documentation Technical support On-premises product support Contact us Try for free Sign in
  • 1 min read

How to get OData URLs with company names that contain forward slashes


Customers who want to consume Dynamics NAV data with OData in Microsoft Excel and have company names such as CRONUS A/G or CRONUS Danmark A/S may find it difficult or result in an error. When connecting to an OData feed from Excel, this does not work unless you don’t specify a Company Name in the connection string and set the company as a “Services Default Company” on the Dynamics NAV Server instance.

In other words, if you have multiple companies that have “A/S” as part of the company name in the same database and only one Dynamics NAV Server instance are unable to connect from Excel.

By default, an OData URL would look something like this:

https://demoserver.domain.com:7048/DynamicsNAV110/ODataV4/Company(‘CRONUS%20Danmark%20A%2FS’)/VendorLedgerEntries

Here’s how to get the connection to work: Include the company name into the query string instead of the OData path:

https://demoserver.domain.com:7048/DynamicsNAV110/ODataV4/VendorLedgerEntries?company=’CRONUS%20Danmark%20A%2FS’

Another example with a filter:

https://demoserver.domain.com:7048/DynamicsNAV110/ODataV4/SalesOrder?company=’CRONUS%20Danmark%20A%2FS’&$filter=Document_Type eq ‘Order’ and No eq ‘1256’ and Bill_to_Name eq ‘ABC/D’

This workaround also applies to other applications and not just Microsoft Excel.

Thank you,
Mohamad Vajid
Microsoft Dynamics NAV

 

Get started with Dynamics 365

Drive more efficiency, reduce costs, and create a hyperconnected business that links people, data, and processes across your organization—enabling every team to quickly adapt and innovate.