Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setEDIPrefix(){
- if(nlapiGetContext().getExecutionContext()=='webservices'&&nlapiGetContext().getUser()==999108){ //user 1646 is my account's SPS user internal id
- var id = nlapiGetFieldValue('tranid'); //gets value from 'document number' field
- nlapiLogExecution('DEBUG','Id: '+id);
- nlapiSetFieldValue('tranid','EDI'+id); //appends "EDI-" prefix to the NetSuite assigned document number
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement