MYOBCommunity
Partner Zone
|
|
Partner Zone

Fields value become empty in PUT customer

1 REPLY
Partner Dataport
4 Posts
Partner
Dataport
Partner

4Posts

0Kudos

0Solutions

Re: Fields value become empty in PUT customer

Hello,

 

Anyone seen the above API issue too?  Help will be greatly appreciated.

 

In fact, I wasn't trying to update these fields in the customer record.  I was trying to update other fields but keep these fields the same as they originally were in the database.

 

I read in the forum that the MYOB's API doesn't support patching an existing record.  When a field is not specified in the PUT method, the field in the database record in end up becoming blank.  Therefore, my solution is to first read the content from the existing record, and then reapply most of the exact same field values back to update the customer record.  That works fine for the most part except for these fields under Selling Details:

 

-Printed Form

-A.B.N

-A.B.N branch

-Tax ID Number

-Income Account

-Receipt Memo

-Salesperson

-Customer Billing Rate

 

Your help would be greatly appreciated.

Partner Dataport
4 Posts
Partner
Dataport
Partner

4Posts

0Kudos

0Solutions

Fields value become empty in PUT customer

I am able to update customer though PUT method, but some fields value are cleaned up.

Even I send the full response from GET customer method, the following fields value always be cleaned up.

 

Issue field:

Selling Details
-Printed Form
-A.B.N
-A.B.N branch
-Tax ID Number
-Income Account
-Receipt Memo
-Salesperson
-Customer Billing Rate

 

Sample of request format(issue field only)

"SellingDetails": {

"IncomeAccount": {

"UID": "01631bdb-7ddb-40f8-9376-d2140b77ae9f",
"DisplayID": "4-1000",
"URI": "https://ar1.api.myob.com/accountright/235b17b7-9b8e-4beb-83c0-2d3f6189894e/GeneralLedger/Account/016...",
"Name": "Sales Income #1"

},
"SalesPerson": {

"UID": "e5fbef41-e9bd-41ae-95ca-6e54d25f459c",
"DisplayID": "*None",
"URI": "https://ar1.api.myob.com/accountright/235b17b7-9b8e-4beb-83c0-2d3f6189894e/Contact/Employee/e5fbef41...",
"Name": "1 Employee"

},
"ABNBranch": "123",
"ABN": "11 111 111 111",
"ReceiptMemo": "memo",
"TaxIdNumber": "123",
"HourlyBillingRate": 100,
"PrintedForm": "INCIIPRE-2009 Tax Inclusive Pre-Printed Inv",
"Memo": "memo"

}

 

Thanks

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post