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
Please note that on Friday, March 20, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. 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