Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
Have questions or experiences to share? Post your Release 2026.1 questions and join discussions in the Release 2026.1 category.
Why is there an error on creating task type record in an unerevent script(aftersubmit).
const newTask = record.create({
type: record.Type.TASK,
defaultValues: {
title: taskName,//String
company: entityId, //entity's internal id
transaction: salesOrderId, //transaction's internal id
},
});
newTask.save();
I got the following error but why this is happening?
{"type":"error.SuiteScriptError","name":"INVALID_RCRD_INITIALIZE","message":"You have entered an invalid default value for this record initialize operation.","stack":["Error\n at suitescript/resources/javascript/record/recordImpl.js:40:12\n at Function.createRecord_raw (suitescript/resources/javascript/record/recordImpl.js:38:24)\n at suitescript/resources/javascript/record/recordImpl.js:26:29\n at Object.createRecord (suitescript/resources/javascript/record/recordImpl.js:24:24)\n at /SuiteScripts/tamura/auto_task_creation.js:52:32\n at Array.forEach (native)\n at Object.afterSubmit (/SuiteScripts/tamura/auto_task_creation.js:40:24)"],"cause":{"type":"internal error","code":"INVALID_RCRD_INITIALIZE","details":"You have entered an invalid default value for this record initialize operation.","userEvent":null,"stackTrace":["Error\n at suitescript/resources/javascript/record/recordImpl.js:40:12\n at Function.createRecord_raw (suitescript/resources/javascript/record/recordImpl.js:38:24)\n at suitescript/resources/javascript/record/recordImpl.js:26:29\n at Object.createRecord (suitescript/resources/javascript/record/recordImpl.js:24:24)\n at /SuiteScripts/tamura/auto_task_creation.js:52:32\n at Array.forEach (native)\n at Object.afterSubmit (/SuiteScripts/tamura/auto_task_creation.js:40:24)"],"notifyOff":false},"id":"","notifyOff":false,"userFacing":true}