This article is relevant if you are working in NetSuite and you need to update a field but it is presented as read only.
Often times, NetSuite form definitions will present information in a read only fashion. ¬†This can be set by using the “Inline HTML” or “Disabled” Display Type definitions in the Custom Form definitions. ¬† ¬†However, there may be times that you need to quickly change information on a record and you don’t want to revert to using another form or performing a CSV update.
Learn the Quick Browser Inspect Mechanism to Modify NetSuite Field Values
Because NetSuite is a web browser application, we have the ability to inspect programmable client-side elements of the system. ¬†The trick then is to learn how to “inspect” those programming elements so they can be manipulated. ¬† I personally use Google Chrome as my primary browser. ¬† To get to Chrome’s Developer Tools on a Mac, use keyboard sequence Alt-Command-I to pop open a console (see associated image for a menu option). ¬†All the major browsers have an equivalent mode of operation.
Once the console is open, you need to know the internal field ID of the element you wish to modify. ¬†See this article on how to view internal field IDs in the NetSuite application. ¬†With that information in hand, you need to issue the following NetSuite SuiteScript API command:
nlapiSetFieldValue('[your internal field id]', '[your value]')
See associated image for an element I wished to update. ¬†I typed the command and pressed Enter on ¬†the keyboard. ¬†At the point, I could see the value had changed on the form indicating I did it right. ¬†Once the read only value was updated, I saved the record as normal. Fast!
Let’s Work Together to Make Using NetSuite Better
If you are a NetSuite power user or consultant, and you hold high standards for care, perhaps we can help others get more from the platform. ¬†Let‚Äôs have a conversation.