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.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Assign timebill to a project task
Using advanced project and trying to assign timebill record to a project task using server side after submit. The task status is "in progress" and my timebill record is good but I get "invalid casetaskevent reference for customer" error.
The ids appear valid. Below I copy fields from and existing timebill entered thru UI but get same result when adding new record. Look like a bug and I am hoping for a workaround suggestion.
Ultimately I am trying to effect the overall project end date calculated thru sequence of required tasks.
function testOnAfterSubmitRecord(type) { var r = nlapiLoadRecord('timebill','536'); nlapiSubmitRecord(r); // <-- this works, can load and save var nr = nlapiCreateRecord('timebill'); nr.setFieldValue('casetaskevent',r.getFieldValue('casetaskevent')); nr.setFieldValue('customer',r.getFieldValue('customer')); nr.setFieldValue('employee',r.getFieldValue('employee')); nr.setFieldValue('hours',r.getFieldValue('hours')); nr.setFieldValue('isbillable',r.getFieldValue('isbillable')); nr.setFieldValue('serviceitem',r.getFieldValue('serviceitem')); nr.setFieldValue('item',r.getFieldValue('item')); nr.setFieldValue('location',r.getFieldValue('location')); nr.setFieldValue('trandate',r.getFieldValue('trandate')); // stuff added to no good effect nr.setFieldValue('isadvancedjob',r.getFieldValue('isadvancedjob')); nr.setFieldValue('isexempt',r.getFieldValue('isexempt')); nr.setFieldValue('isproductive',r.getFieldValue('isproductive')); nr.setFieldValue('isutilized',r.getFieldValue('isutilized')); nr.setFieldValue('overriderate',r.getFieldValue('overriderate')); nr.setFieldValue('projecttaskassignment',r.getFieldValue('projecttaskassignment')); nr.setFieldValue('subsidiary',r.getFieldValue('subsidiary')); nr.setFieldValue('customersub',r.getFieldValue('customersub')); nr.setFieldValue('employeesub',r.getFieldValue('employeesub')); nr.setFieldValue('customform',r.getFieldValue('customform')); nr.setFieldValue('istimebillablebydefault',r.getFieldValue('istimebillablebydefault')); nr.setFieldValue('origcustomer',r.getFieldValue('origcustomer')); nr.setFieldValue('type',r.getFieldValue('type')); nlapiSubmitRecord(nr); // <-- this fails, complains casetaskevent invalid for customer } 0