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.
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