Cmdlets for MYOB

Build 24.0.9060

Update-MYOB Cmdlet

Parameters   Output Objects  

Updates MYOB data.

Syntax

Update-MYOB [parameters]

Remarks

The Update-MYOB cmdlet allows you to use a syntax similar to SQL UPDATE statements to update MYOB data.

$conn = Connect-MYOB If using an online instance: -InitiateOAuth "GETANDREFRESH" -OAuthClientId "YourClientId" -OAuthClientSecret "YourClientSecret" -CallbackURL "http://localhost:33333" -CompanyFileId "327eed10-9615-4e5e-bd9e-ae2cc00e2c70" -User "companyFileUser" -Password "companyFilePassword" If using an on premise instance:   -InitiateOAuth "OFF" -URL "http://localhost:8080/accountright" -CompanyFileId "327eed10-9615-4e5e-bd9e-ae2cc00e2c70" -User "companyFileUser" -Password "companyFilePassword"
Update-MYOB -Connection $conn -Table "Accounts" -Columns @("Name") -Values @("Jon Doe") -Id "6186169c-6540-4d72-8bfe-ecc706e500ee"
The Where parameter can also be used to specify the primary key of the table:
Update-MYOB -Connection $conn -Table "Accounts" -Columns @("Name") -Values @("Jon Doe") -Where "Id = '6186169c-6540-4d72-8bfe-ecc706e500ee'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-MYOB -Connection $conn -Table Accounts -Where "Type = 'Bank'" | Update-MYOB -Columns @("Type") -Values @("Bank 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060