suitescript update inline textarea field in client...
# ask-stanley-ai
k
suitescript update inline textarea field in client script
c
AI generated answer (using internal Slack threads):
To update an inline textarea field in a client script in SuiteScript, you can't directly set the value of an inlineHtml field from a client script. However, you can manipulate the DOM to change the value. This can be done using vanilla JavaScript or jQuery, which is already in scope. Here's a simple example of how you might do this:
Copy code
javascript
function pageInit(scriptContext) {
    var currentRecord = scriptContext.currentRecord;
    var inlineHtmlField = currentRecord.getField({
        fieldId: 'custpage_inlinehtml'
    });
    var inlineHtmlValue = inlineHtmlField.value;
    // manipulate the inlineHtmlValue here
    // then update the DOM
    document.getElementById('custpage_inlinehtml').innerHTML = inlineHtmlValue;
}
Please note that this approach is not officially supported by NetSuite and may break if NetSuite changes their DOM structure in the future. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841796935
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84021008
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.839233458
Please provide your feedback on this answer.