Skip to content

Commit 02539c1

Browse files
authored
Create Readme.md
This ServiceNow Script Include automates the creation of a Problem record from an existing Incident record.
1 parent 2650d8b commit 02539c1

File tree

1 file changed

+23
-0
lines changed
  • Server-Side Components/Background Scripts/Problem from Incident

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# CreateProblemFromIncident Script Include
2+
3+
This ServiceNow Script Include automates the creation of a Problem record from an existing Incident record.
4+
5+
## 🔧 Functionality
6+
7+
- Fetches the Incident using its `sys_id`.
8+
- Creates a new Problem record with relevant fields copied from the Incident.
9+
- Links the Incident to the newly created Problem via the `problem_id` field.
10+
11+
## 📥 Input
12+
13+
- `incidentSysId`: The `sys_id` of the Incident record.
14+
15+
## 📤 Output
16+
17+
- Returns the `sys_id` of the newly created Problem record.
18+
19+
## 🧪 Example Usage (via Script or Flow)
20+
21+
22+
var creator = new CreateProblemFromIncident();
23+
var newProblemSysId = creator.createProblem('INCIDENT_SYS_ID_HERE');

0 commit comments

Comments
 (0)