Windows PowerShell ISE - New-NAVCRMTable

ALFEGO79ALFEGO79 Member Posts: 10
Hi people, i would like to execute this script by PowerShell:

New-NAVCRMTable –CRMServerMyOrg.Crm4.Dynamics.Com –EntityLogicalName systemuser,campaign –ObjectId 5340,50001 –Name “CRM Systemuser”,“CRM Campaign” –OutputPath c:\CRMObjects

but it can not find cmlet New-NAVCRMTable. Any suggestion? I imagine i have to import a module with Import-Module but i dont know where it is.

Thanks in advance.

Answers

  • DuikmeesterDuikmeester Member Posts: 308
    Open en run "C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\NavModelTools.ps1" in ISE.
  • ALFEGO79ALFEGO79 Member Posts: 10
    Yes and also i hace had to update Navision Client
  • TomigsTomigs Member Posts: 86
    Hi guys,

    Just to add on this: I wasn't able to find the New-NAVCRMTable function either, on a BC140 version (Build 35570).

    In my case I realized that the cmdlet to import was on a separate sub-folder called "Model.Tools.Crm". So it seems that on this version it was not included on the avModelTools.ps1, but on a separate one.

    The modules file to import was in a a psd1 file "Microsoft.Dynamics.Nav.Model.Tools.Crm.psd1".

    So I had to add the below line on Powershell to be able to import the function:

    Import-Module 'C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\140\RoleTailored Client\Model.Tools.Crm\Microsoft.Dynamics.Nav.Model.Tools.Crm.psd1' -Verbose

    Not sure if I did something wrong on installing NAV. The official Msft documentation doesn't seem to mention it (considers it to be on the NavModelTools library). Just in case somebody come across the same.

    Regards,
    Tomas
Sign In or Register to comment.