Update-DynamicsNAV Cmdlet
Updates Microsoft Dynamics NAV data.
Syntax
Update-DynamicsNAV [parameters]
Remarks
The Update-DynamicsNAV cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Microsoft Dynamics NAV data.
$conn = Connect-DynamicsNAV -URL "http://myserver:7048" -ServerInstance "DYNAMICSNAV71" -Password "MyPassword" -User "MyServer\MyUser" Update-DynamicsNAV -Connection $conn -Table "Customer" -Columns @("Contact") -Values @("Jon Doe") -Id "http://myserver:7048/DynamicsNAV71/OData/Customer('01234567')"The Where parameter can also be used to specify the primary key of the table:
Update-DynamicsNAV -Connection $conn -Table "Customer" -Columns @("Contact") -Values @("Jon Doe") -Where "Id = 'http://myserver:7048/DynamicsNAV71/OData/Customer('01234567')'"The primary key can also be passed to the cmdlet along the pipeline:
Select-DynamicsNAV -Connection $conn -Table Customer -Where "Name = 'CData, Inc.'" | Update-DynamicsNAV -Columns @("Name") -Values @("CData, Inc. 2")