Saturday, February 9, 2019

Remove/Disable the Reject Button on Transfer Orders

A NetSuite user would like toremove/disable the Reject button on Transfer Orders. Removing/Disabling thisbutton provides an additional level of control over when and by whom the rejectaction can be performed (e.g. for certain roles or only under certain circumstances). 

This can be accomplished with the Before Load function of a UserEvent script deployed to Transfer Orders.

Below is a sample code snippet which will remove the Reject button from theTransfer Order form:
form.removeButton('reject'); 

The following script will disable the Reject button on Transfer Orders:
functionbeforeLoad(type,form) 

  var rejectButton =form.getButton('reject'); 
  if (rejectButton !=null) 
     rejectButton.setDisabled(true); 


Note: This applies only to Transfer Orders. For more information about the internal IDs of standard NetSuite buttons please see Button IDs.

DISCLAIMER: The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Netsuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.

Netsuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Netsuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.

Netsuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.

No comments:

Post a Comment