Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
attaching new message to existing case
I the following script to auto create support cases:
var newrecord = nlapiCreateRecord( 'supportcase' );
newrecord.setFieldValue( 'assigned', a );
newrecord.setFieldValue( 'company', b );
newrecord.setFieldValue( 'title', c );
newrecord.setFieldValue( 'incomingmessage', d );
var caseid = nlapiSubmitRecord( newrecord, false, true );
// this script will be used in an automated process, hence ignoring mandatory fields and sourcing
This works terrifically, creating a new Case and assigning 'incomingmessage' to a new message attached to the newly created case.
As a followup I tried to attach a second message to the case with the following script:
var record = nlapiLoadRecord( 'supportcase', caseid );
record.setFieldValue( 'incomingmessage', 'All your base are belong to us.' );