when adding an inlinehtml field in a suitelet, how...
# ask-stanley-ai
b
when adding an inlinehtml field in a suitelet, how do I make it hidden
c
AI generated answer (using internal Slack threads):
To hide an inlineHTML field in a Suitelet, you can use the
updateDisplayType
method and set it to hidden. Here is an example of how you can do this:
Copy code
javascript
var field = form.addField({
    id: 'custpage_myfield',
    type: serverWidget.FieldType.INLINEHTML,
    label: 'My Field'
});

field.updateDisplayType({
    displayType: serverWidget.FieldDisplayType.HIDDEN
});
However, please note that this method will not work in a client script. InlineHTML fields are not accessible via
currentRecord.getField()
in a client script. If you need to manipulate the visibility of an inlineHTML field in a client script, you might need to use DOM manipulation or include a CSS class
display:none
in your HTML content. ****** 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.839389205
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830973268
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.828464031
Please provide your feedback on this answer.