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.
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?

Weekly TimeSheet client script totalHours not refresh in direct

Hello,

I have a question when i use a client script on time sheet, i use this ==>

var timesheetRecord = scriptContext.currentRecord;

var totalHours = timesheetRecord.getValue('totalhours');


But when i log it this variable totalHours , i don't have the current value but i have the previous save value on the record and not the value in direct.

can i do a refresh in my script for take the good value i direct before save it ?

function saveRecord(scriptContext) {


var timesheetRecord = scriptContext.currentRecord;

var totalHours = timesheetRecord.getValue('totalhours');

log.debug({

title : 'totalHours',

details : totalHours

});

if (Number(totalHours) > 39) {

dialog.alert({

title : 'Alert',

message : 'Le temps total saisie est supérieur de 39'

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