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.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Javascript Error when attempting nlapiCreateRecord
I have the following javascript.
function create_case() { var company={"company": { "name": "CU000001 Anonymous Customer", "internalid": "3" }}; var contact={"contact": { "name": "fake", "internalid": "781" }}; var due_date="7/20/2012"; var record=nlapiCreateRecord('supportcase'); record.setFieldValue('title', 'test'); record.setFieldValue('incomingmessage', 'test incoming message'); record.setFieldValue("company", company); record.setFieldValue('contact', contact); record.setFieldValue('custeventduedate', due_date); id = nlapiSubmitRecord(record, true); return record; } And I'm getting this error. With a similar one for contact.
{ "error" : { "code" : "INVALID_KEY_OR_REF", "message" : "Invalid company reference key {company={name=CU000001 Anonymous Customer, internalid=3 } } When loading an existing supportcase with the following javascript
function create_case() { var record=nlapiLoadRecord('supportcase', '46145'); return record; } 0