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.
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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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