Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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'