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.
How to hide specified fields in custom subrecords in view mode?
I created a custom record A and its related sublist B. When viewing the A record, it seems that the following method cannot hide specific fields in the sublist (subrecord B), although it can be hidden in edit mode. Are there any other ways to hide fields in this scenario (besides using CSS)?
Thanks!
const beforeLoad = (scriptContext) => {
if (scriptContext.type == 'view'){
let sublist = form.getSublist({id: 'recmachcustrecord_sublist_id'});
let subField = sublist.getField({id: 'custrecord_sublist_field_id'});
log.debug('subField',JSON.stringify(subField))
// log.debug result: {}
subField.updateDisplayType({
displayType: 'hidden'
});
}
}
Tagged:
0