Question: User needs to limit the field value entered for the Reference No field found on the Transactions > Purchases / Vendors > Enter Bills.
Answer:
1. Create a Client Side Script by navigating to Setup > Customization > Scripts > New > Client.
Script:
function limitReferenceNumber(type, name){
if(name == 'tranid'){
var tranid_length = nlapiGetFieldValue('tranid');
if(tranid_length.length > 15){
alert('Please limit the reference number to 15 digits only');
}
}
}
Note:
1. The alert (if reference number has more than 15 digits) is triggered after the User clicks out of the text box (or in JavaScript terms, enters lose focus event).
2. User can have the above event trigger on validate field function.
No comments:
Post a Comment