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
How to create a project task for a newly created project in Suitescript?
It's been months since I wrote any Suitescript so I'm a little rusty. Trying to create a project task, but it's not working.
I know I need to tell it which project the task is for somehow, I'm trying to use company, and taking the companyname property from the project, but that's not working.
var projectTask = nlapiCreateRecord('projecttask');
projectTask.setFieldValue('company',projectName);
projectTask.setFieldValue('title',taskName);
nlapiSubmitRecord(projectTask);
The error I'm getting is "Invalid company reference key "
0