问题
I have a doubt about the nlapiSetFieldValue and nlapiGetFieldValue methods on NetSuite API.
Do these methods work somehow on client script, when the record is in view mode? I'm having a hard time getting and setting any fields values without accessing the DOM elements directly.
Here's what I'm trying to achieve: I have a process running in background, and on a custom record's view mode I have a button to check its status. When the status changes, I only need to refresh one field with its current value, wich I'm getting via a restlet call.
I'm trying to avoid reloading the whole page, to improve performance.
Please notice that I don't need to commit the value, because it already is saved on the record. I just need to show the updated status on runtime.
Thanks in advance.
回答1:
I just received an answer from the NetSuite team:
There isn't a way to use API methods to achieve this, so their suggestion is to reload the page on this case.
You can always access the DOM elements directly, but this is not a best practice.
来源:https://stackoverflow.com/questions/30442386/how-to-set-a-fields-value-on-the-view-mode-of-a-netsuite-custom-record-using-c