Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameTypeMandatoryDefault Value
SimpleRecordSimpleRecordYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleapplyTo
let record = new SimpleRecord('itsm_incident');
let template = new SimpleTemplate('incident template');
template.applyTo(record);
ss.info(record.getAttributes());

...

NameTypeMandatoryDefault Value
SimpleRecordSimpleRecordYN
templateArrayYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleapplyToByTemplateField
let record = new SimpleRecord('task);
let task = new SimpleRecord(‘task’);
task.get(‘156837247306928785’);
let template = new SimpleTemplate();
template.applyToByTemplateField(record, task.template);
ss.info(record.getAttributes());

...

NameTypeMandatoryDefault Value
SimpleRecordSimpleRecordYN
templateNameStringYN


Return:

TypeDescription
Big IntegerThe template ID.


Example:

Code Block
languagejs
themeEclipse
titlecreateBySimpleRecord
let record = new SimpleRecord('itsm_incident');
record.get(‘156837247306928785’);
let template = new SimpleTemplate();
ss.info(JSON.stringify(template.createBySimpleRecord(record, ‘new incident template’)));

...

NameTypeMandatoryDefault Value
templateDataArrayYN
tableNameStringYN
templateNameStringYN


Return:

TypeDescription
Big IntegerThe ID of the template created.


Example:

Code Block
languagejs
themeEclipse
titlecreateByTemplateData
let template = new SimpleTemplate();
ss.info(JSON.stringify(template.createBySimpleRecord({‘subject’: ‘New subject’}, ‘itsm_incident’, ‘new incident template’)));


createByTemplateField(template, tableName, templateName)

...

NameTypeMandatoryDefault Value
templateArrayYN
tableNameStringYN
templateNameStringYN


Return:

TypeDescription
Big IntegerThe ID of the template created.


Example:

Code Block
languagejs
themeEclipse
titlecreateByTemplateData
let template = new SimpleTemplate();
ss.info(JSON.stringify(template.createBySimpleRecord({‘subject’: ‘New subject’}, ‘itsm_incident’, ‘new incident template’)));

...

NameTypeMandatoryDefault Value
templateNameStringYN


Return:

TypeDescription
VoidThis method does not return a value.


Example:

Code Block
languagejs
themeEclipse
titleget
let template = new SimpleTemplate();
template.get('test template');

...