Way to mark a Custom Field as Read Only
There ought to be a way to tag a custom field as read only. If you "get" a record with a read only custom field and then "update" it, the result is an error. That is because your update is technically trying to set the read-only custom field to the same value it got.
A workaround for now is to remove read only fields manually each time you get a record before updating said record.
I wonder if the ignoreReadOnlyFields preference would solve this issue http://mulesoft.github.io/netsuite-connector/java/com/netsuite/webservices/platform/messages_2013_2/Preferences.html
What exactly is this Prefrerences class? Can you include it in any given SOAP request when operating with another record? Might do the trick- should give it a try.
On Wed, Oct 22, 2014 at 10:17 AM, Michael Bianco [email protected] wrote:
I wonder if the ignoreReadOnlyFields preference would solve this issue http://mulesoft.github.io/netsuite-connector/java/com/netsuite/webservices/platform/messages_2013_2/Preferences.html
Reply to this email directly or view it on GitHub https://github.com/RevolutionPrep/netsuite/issues/22#issuecomment-60091370 .
Hi,
Were you able to get this working?
Is there a way I can set it in the config? I can see there is a soap_header portion of the configuration, but I'm unsure how to use it.
Thanks.
Link 404s now.
Took me a little head scratching but here's how you'd set the soap header from the config:
NetSuite.configure do
# ...
soap_header(
'platformMsgs:preferences' => {
'platformMsgs:ignoreReadOnlyFields' => true,
}
)
end
Thank you so much!