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.
Trying to calculate the total "Duration"
Hi there,
1. Creat a new Task in Netsuite;
2. Add several time entries logged in the Time tab;
3. Create a new custom field called "Total Duration" in the main section of the Task;
4. Write custom code to sum up all the time entries and calculate the total amount of time that was logged against this task.
My custom code is not working properly, it keeps giving me a script error:
[LIST]'document.forms.main_form.elements[...].value' is null or not an object[/LIST]
The custom code looks like this:
function pageinit(type)
{
if (type=='edit')
{
nlapiSetFieldValue('custevent_total_duration',calculateTime());
0