dsUpdate error Cutomer Order Fileds giving error

(Page Designer) #1

Can anyone send me IS API error code page URL to check error code details?
How to add/update custom field in Order with API?

Im using this method:

$app->dsUpdate(‘Invoice’, $invoiceId, $orderDetails);

where $orderDetails is array for custom field of Order, im getting following error:

ERROR: 7 - [NoTableAccess]Access denied to table Invoice

(John Borelli) #2

I don’t know of any documentation on Infusionsoft error codes, however, to update a custom field on the order table using dsUpdate you would do the same thing as you would with contacts. In your $orderDetails array add the custom field to the array in the same way as it is for contacts. So add an array element that looks something like “_customField”=>“field value”

(Page Designer) #3

Yes im doing the same way as you wrote, but im getting above mentioned error?

(John Borelli) #4

what error are you getting. Maybe starting there will be simpler.

(Page Designer) #5

here is the error already mentioned in my question

(John Borelli) #6

There you go :stuck_out_tongue_winking_eye: The invoice table is not writeable by the api and it isn’t the table to get/store custom fields on. You must use the order not the invoice. That is to say the “Job” table which is the order table (old name)

(Page Designer) #7

wow thanks for help!!!

(Pav) #8

Make sure you check the Table documentation to see which Tables and Columns can be viewed, queried, edited, and deleted on.