Hide a Field Created by a Locked User Event Script in a Bundle

Hide a Field Created by a Locked User Event Script in a Bundle. Some Bundles have locked User Event Scripts that create custom fields on records. To know if the field is created by a script the field’s internal id will be prefixed by custpage.

Users can see the field’s internal id on the field level help when the User Preference > Show Internal IDs is set.

const beforeLoad = (scriptContext) => {

    var form = scriptContext.form; var field = form.getField({ id: “custpage_lsa_vis”, });

    field.updateDisplayType({ displayType: serverWidget.FieldDisplayType.HIDDEN, });

};

Leave a comment

Your email address will not be published. Required fields are marked *