<@U3NBCQWBD> button is added in view mode of user ...
# suitescript
m
@igorp button is added in view mode of user event script - code is : function beforeLoad(context) { log.debug('in beforeLoad, context type is '+context.type+', form is '+context.form); if (context.type == context.UserEventType.EDIT||context.type==context.UserEventType.XEDIT) { return; } var form=context.form; var cr=context.newRecord; var parent=cr.getText('parent'); var company=cr.getValue('companyname'); var targetCompany=''; if(!parent) targetCompany=company; else targetCompany=parent+' : '+company; log.debug('in beforeLoad, target company is '+targetCompany); form.clientScriptModulePath='./MSi_cs_CallSpecialOrder.js'; form.addButton({ id : 'custpage_so_SpecialOrderButton', label : 'Special Order', functionName : 'callSpecialOrder('+targetCompany+')' }); } return { beforeLoad: beforeLoad };