function setAccountOnPayment(type,name){ /*nlapiLogExecution('DEBUG', 'Inside client validation function:'); if (name.getFieldValue == 'paymentmethod' && nlapiGetFieldText('paymentmethod') == "AirPlus") { nlapiLogExecution('DEBUG','Inside if--->'); nlapiSetFieldValue('account',812); }*/ var paymentMethod = nlapiGetFieldValue('paymentmethod'); nlapiLogExecution('DEBUG', 'Payment Method: ',paymentMethod); nlapiLogExecution('DEBUG', 'Inside client validation function:'); if (paymentMethod=='9') { nlapiLogExecution('DEBUG','Inside if--->'); nlapiSetFieldValue('undepfunds', 'F'); nlapiSetFieldValue('account', 085900); } }