creation of record in table in same table business rule
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 12:36 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 12:56 AM
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);
