/**
* @NApiVersion 2.x
* @NScriptType ClientScript
*/
// In SuiteScript 2.0
define(['N/search'], function(search) {
return {
pageInit: function(context) {
//create an inline html field
var hideFld = context.form.addField({
id:'custpage_hide_buttons',
label:'not shown - hidden',
type: serverWidget.FieldType.INLINEHTML
});
//for every button you want to hide, modify the scr += line
var scr = "";
scr = 'jQuery("#newrecrecmachcustrecord_volumesubprojectparent").hide();';
//push the script into the field so that it fires and does its handy work
hideFld.defaultValue = "<script>jQuery(function($){require([], function(){" + scr + ";})})</script>"
}
}
});