Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

creation of record in table in same table business rule

Tippireddy Venk
Tera Contributor

I'm  working on sc task business rule. I want to create a  record in sc task if category is monitorig please help me to create a record.

1 REPLY 1

Harish Bainsla
Kilo Patron

Hi create Br

(function executeRule(current, previous /*null when async*/) {


if (current.category == 'monitoring') {

var newTask = new GlideRecord('sc_task');
newTask.initialize();
newTask.short_description = 'Your Short Description Here';
newTask.description = 'Your Description Here';
newTask.category = 'monitoring';
var newTaskID = newTask.insert();

gs.print('New SC Task created with sys_id: ' + newTaskID);
}

})(current, previous);