Update-SAPBusinessOne Cmdlet
Updates SAP Business One data.
Syntax
Update-SAPBusinessOne [parameters]
Remarks
The Update-SAPBusinessOne cmdlet allows you to use a syntax similar to SQL UPDATE statements to update SAP Business One data.
$conn = Connect-SAPBusinessOne -Url 'http://localhost:50000/b1s/v1' -User 'user' -Password 'password' -CompanyDB 'companydb' Update-SAPBusinessOne -Connection $conn -Table "Orders" -Columns @("DocType") -Values @("dDocument_Items") -Id "22"The Where parameter can also be used to specify the primary key of the table:
Update-SAPBusinessOne -Connection $conn -Table "Orders" -Columns @("DocType") -Values @("dDocument_Items") -Where "Id = '22'"The primary key can also be passed to the cmdlet along the pipeline:
Select-SAPBusinessOne -Connection $conn -Table Orders -Where "DocType = 'dDocument_Items'" | Update-SAPBusinessOne -Columns @("DocType") -Values @("dDocument_Items 2")