Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Get error using form.addField
Here is the block of code I'm having trouble with...
var html = '<script type="text/javascript">'; html += 'alert(alertMsg)'; html += '</script>'; alert('1'); var customScriptField = form.addField('custpage_alertmode', 'inlinehtml', 'customScript', null, null); alert('2'); customScriptField.setDefaultValue(html);I get alert 1, but it doesn't get to alert 2, so I know the problem is with the form.addField line. The error that returns is "undefined is null or not an object". So I did an alert(form), and the value for the form object is undefined. I have it as a variable when I name the function
0