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