For a custom Customer Center role having Fulfill Sales Order=None, when a user clicks See Orders in theCustomer Center > view any order > a Print button is displayed. To hide this Print button, here are the steps:
1. Create a user event script by navigating to Customization > Scripting > Scripts > New > User Event. User Event needs to be setup this way:
Deployments
Applies to: Sales Order
Deployed: Yes
Status: Released
Scripts:
Before Record Load: restrictPrintButtonOnWebStore <-- this is the name of the function
Script :
1. Create a user event script by navigating to Customization > Scripting > Scripts > New > User Event. User Event needs to be setup this way:
Deployments
Applies to: Sales Order
Deployed: Yes
Status: Released
Scripts:
Before Record Load: restrictPrintButtonOnWebStore <-- this is the name of the function
Script :
function restrictPrintButtonOnWebStore(type, form){ var currentContext = nlapiGetContext(); if (currentContext.getExecutionContext() == 'webstore') { nlapiLogExecution('Debug', 'context', currentContext.getExecutionContext()); userRole = nlapiGetRole(); nlapiLogExecution('Debug', 'nlapiGetRole()', userRole); if(userRole == 1017){ var button = form.getButton('print'); button.setVisible(false); } } }
Thanks for sharing informative blog.
ReplyDeleteLearn more here:
Netsuite Implementation
Netsuite Experts
Netsuite Integration Services
It is really a great work and the way in which you are sharing the knowledge is excellent. Thanks for your informative blog.
ReplyDeleteNetSuite Santa Monica