Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Don't miss out on our Weekly Quiz! You only have until May 30, 2PM EST to comment your answers and earn rewards! Click here for more details.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?

User Event Script to Set Due Date on Vendor Bill Reverts to the Current Date

edited Dec 7, 2020 8:48PM in SuiteCloud / Customization 5 comments

Hi,

I have a User Event script which will get a specified date from the PO and set it as the Due Date on the Vendor Bill. The script successfully sets the Due Date field, however after the record fully loads the field changes back to todays date. Any thoughts on how I can make the updated date stick to the field? Script and video here.

function vendBillDueDate(type){

nlapiLogExecution('DEBUG','I am running!');

  var ponum = nlapiGetFieldValue('podocnum');

nlapiLogExecution('DEBUG','My PO #'+ponum);

  if(ponum != null && ponum != ''){

    var poRec = nlapiLoadRecord('purchaseorder', ponum);

var poTerms = poRec.getFieldText('terms');

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 2 ((Apr-Jun 2024) )

This Week's Leaders

This Month's Leaders

All Time Leaders