We are hitting a problem with updating a NetSuite Sales Order (specifically we're updating a custom field) but are bouncing off some Read-only fields that we don't even explicitly write to in our code.
We retrieve the order, update the custom field and then call WriteResponse rc = this.nsPort.update(order);
where order
is an instance of SalesOrder
pulled by internalID
and nsPort
is an instance of NetSuitePortType
. The call to update()
fails with an exception:
java.lang.Exception: You do not have permissions to set a value for element subtotal
due to one of the following reasons: 1) The field is read-only; 2) An associated feature
is disabled; 3) The field is available either when a record is created or updated, but
not in both cases.
Which field is read-only is immaterial here, it just matters that we're (unintentionally) sending an update back that involves read-only fields.
It strikes me that we'd ideally only send an update that writes to just the custom field we're interested in.
Is there any way to pull an a record from NetSuite and then update just certain fields? Or is there a way to inform SuiteTalk to just update certain fields when we call update()
?