JM
04/13/2021, 1:25 PMMike
04/13/2021, 1:34 PMif (record.getValue('custbody12') == true) {
var form = context.form;
form.removeButton({
id: 'requestfulfillment',
});
}
Mike
04/13/2021, 1:34 PMtuli
04/13/2021, 1:35 PMtuli
04/13/2021, 1:36 PMtuli
04/13/2021, 1:37 PMJM
04/13/2021, 1:43 PMJM
04/13/2021, 1:44 PM/**
* Module Description
*
* Version Date Author Remarks
* 1.00 13 Apr 2021 JM Tangile
*
*/
/**
* The recordType (internal id) corresponds to the "Applied To" record in your script deployment.
* @appliedtorecord recordType
*
* @param {String} type Operation types: create, edit, view, copy, print, email
* @param {nlobjForm} form Current form
* @param {nlobjRequest} request Request object
* @returns {Void}
*/
function userEventBeforeLoad(type, form, request){
try{
var ctx = nlapiGetContext();
var exec_context = ctx.getExecutionContext();
var rec = nlapiGetNewRecord();
var rec_type = nlapiGetRecordType();
if(rec_type == 'itemfulfillment'){
var if_status = rec.getFieldValue('shipstatus');
var order_type = rec.getFieldValue('ordertype');
nlapiLogExecution('DEBUG',type+exec_context+rec_type+if_status+order_type);
if(type == 'view' && exec_context == 'userinterface' && if_status == 'B' && order_type == 'SalesOrd'){
form.removeButton('markepacked');
}
}
}
catch(e){
nlapiLogExecution('DEBUG', 'ERROR ON beforeLoad', e.name+' : '+e.message);
}
}
JM
04/13/2021, 1:44 PMJM
04/13/2021, 1:45 PMbattk
04/13/2021, 1:46 PMbattk
04/13/2021, 1:47 PMJM
04/13/2021, 2:54 PMmichoel
04/13/2021, 11:01 PMmichoel
04/13/2021, 11:01 PM