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 reply to a supportcase
I can create a case with the following.
function create_case(input) { var record=nlapiCreateRecord('supportcase'); record.setFieldValue('title', input['subject']); record.setFieldValue('incomingmessage', input['message']); record.setFieldValue('company', input['company_id']); record.setFieldValue('contact', input['contact_id']); record.setFieldValue('email', input['email']); record.setFieldValue('priority', input['priority']); record.setFieldValue('custeventduedate', input['due_date']); id = nlapiSubmitRecord(record, true); return record; } I notice that the nlapiCreateRecord does not allow you to specify record ID, so I tried the following.
function create_case(input) { record=nlapiSubmitField('supportcase', input['case_id'], 'incomingmessage', input['message']); return record; } I then receive the following error.
"{ "error" : { "code" : "UNEXPECTED_ERROR", "message" : "An unexpected error has occurred. Error ID: h5dvi7p257ngjx15ltu7" } }" 0