New-NAVCrmTable cmdlet enhancement


With Microsoft Dynamics NAV 2016 CU 20 and Microsoft Dynamics NAV 2017 CU 7, the PowerShell cmdlet New-NavCrmTable has been enhanced with 3 changed or added parameters:

  • AuthenticationType
  • Verbose
  • ConnectionString

See also the updated cmdlet Help online.

AuthenticationType

The -AuthenticationType parameter has been changed from an open string into an enumerator with the following values supported by the currently used Microsoft Dynamics 365 SDK:

• AD
• IFD
• OAuth
• Office365

For more information, see AuthenticationType Enumeration.

Verbose

The -Verbose switch is now able to show the full-blown connection string that is issued to Microsoft Dynamics 365. See below an example with an on-premises Active Directory authentication connection string.

ConnectionString

There is a new parameter called -ConnectionString. If specified, this override all other parameters required to pack the connection string and used to connect to Microsoft Dynamics 365. See below a quick and simple example with Microsoft Dynamics NAV 2017:

Import-Module 'C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\NavModelTools.ps1'

$opath = 'C:\TEMP'
 $connstr = 'Url=http://dtcrmnav7:5555/MyOrganization; Username=CRMDT7\Administrator; Password=Pass@word1; authtype=AD; RequireNewInstance=true'
 New-NAVCrmTable -ConnectionString $connstr -EntityLogicalName account -ObjectId 50555 -Name 'CRM Account' -OutputPath $opath -Verbose

If you would like to have a flavor how connection string are built to be used against Microsoft Dynamics CRM SDK, you might get inspired by the following official MSDN entry

Use connection strings in XRM tooling to connect to Dynamics 365

These postings are provided “AS IS” with no warranties and confer no rights.
You assume all risk for your use.

Duilio Tacconi (dtacconi)
Microsoft Customer Service and Support (CSS) EMEA

Comments (2)

  1. Tarek says:

    Hello, I am posting my request here coz I could not another way, so please bare with me.

    I am trying to upload a budget from excel to Navision, however, my budget is split into accounts and cost centers in each account. ie: I was successful to post budget as account totals split by month, howver I am facing difficulties in preparing the budget split by cost center by account.

    Could anyone please suggest the best method to use??

    Thank you

    1. Jens Glathe says:

      Hi Tarek,

      I would suggest one excel page by cost center… usually the excel export/import should support it. Regarding where to ask: Try the dynamics community https://community.dynamics.com/nav/f/34 or mibuso.com.

      with best regards

      Jens

Skip to main content