/** * @NApiVersion 2.x * @NScriptType ClientScri...
# suitescript
r
/** * @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>" } } });
s
Why are you creating an inline field to do something, instead of just doing the hiding in pageInit.
jQuery('#newcontact').hide()
that hides the new contact button on a transaction. Should be able to do the same with the correct button id on yours