Discussions
Using arguments
Hello. I'm using the following script to fire an alert on a sales order based on a field in the customer record. It works great thanks to reviewing different posts. I'm new to JScripting and had a question why the arguments in the function are needed?
function MemoTest(type, name)
{
if(name=='entity'){
var customer= nlapiGetFieldValue('entity')
var supporthold = nlapiLookupField('customer',customer, 'custentity_support_hold');
if (supporthold== "T"){
alert("This Customer is on support hold, please do not service and have them call Maher at 905-307-6873");
}
}
}
If any argument is left out the script does not work. I'm not sure why these arguments are necessary or how they are used. This is client side field changed function. Any help is appreciated.