Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

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

// Add your code here
if(current.category == 'hardware'){
var gr=new GlideRecord('problem');
gr.initialize();
gr.short_description=current.short_description;
gr.category=current.category;
gr.impact=current.impact;
gr.urgency=current.urgency;
gr.insert();

}
})(current, previous);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This script is a ServiceNow Business Rule that creates a Problem record whenever an Incident is created with the category "hardware".

Note: Not every hardware-related incident requires a problem record — this script is just an example to show how such automation can be set up.
Loading