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:
See also the updated cmdlet Help online.
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:
For more information, see AuthenticationType Enumeration.
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.
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
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