Hi all! Having some permission trouble closing ord...
# suitetalkapi
m
Hi all! Having some permission trouble closing orders. I've got lots of Suitetalk integration working nicely, but I'm struggling to close sales orders. It looks as though I need to either set the order status to
Closed
, or set
isClosed
to true on all the order items. But when I send the update message to Netsuite, I get back an error that
You do not have permissions to set a value for element paymenteventdate
. I've already got some permissions set on the API user's role, including full permission on Transactions > Sales Order, but have no idea which permission might be missing to allow me to set the paymenteventdate. Given the old problem of permission changes taking at least an hour to take effect and the number of different permissions, I can't really just go through trying them all one by one. Any suggestions which permission I need to grant, or how to go about finding which permission I need?
c
You just need to set the "isclosed" property on each line to true in order to close a sales order. Should only need an edit permission. Not sure on the paymenteventdate as its a native field and should be part of the sales order permission scheme
Could just need to let it sit for a few before changes are live.. ive seen that happen before
m
Thanks - I'll leave it overnight and see if the order changes to closed. I thought "Full" permission on Sales Orders would be enough too.
Weirdly, if I log in to Netsuite using that API user role, I can close orders ok...
c
maybe you're doing something other than closing sales orders and you looked over it.
m
Ah - cracked it! The problem was not the act of closing the order. I was getting the order from Netsuite, then updating the order items on that order, and sending it back for an update. But that order object had some auto-populated fields on that can't be updated. So actually, just getting the order and sending it back unchanged in an update request had the same error. I've got this working now by creating a new SalesOrder object to send in the update request, and only populating the fields I want to change.