Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Script on Weekly Time entry form
Hi,
I have a client script to populate a field on timeentry form which works when a timeentry is made on daily basis.
I modified the script such a way that the script should populate the field even if the time entry is made on a weekly basis.But the script is giving an unexpected error.
Is there something wrong in the following script?
Any help is appreciated.
Thanks,
Iby
function onSave() { weekly_time_count = nlapiGetLineItemCount('timeitem'); if(weekly_time_count < 1) return true; for (var i = 1 ; i<= weekly_time_count ; i++ ) { jc_job_labor_cost_method = nlapiGetLineItemValue('timeitem','custcol_jc_job_labor_cost_method', i); jc_so_labor_cost_method = nlapiGetLineItemValue('timeitem','custcol_jc_so_labor_cost_method', i); employee_type = nlapiGetLineItemValue('timeitem','custcol_jc_employee_type', i); //alert(employee_type); jc_so_time_cost = 33; nlapiSetLineItemValue('timeitem','custcol_jc_so_time_cost', jc_so_time_cost ,i); } return true; } 0