After creation of incident populate incident number on custom field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:42 AM
Hello Experts,
I have created one script include to create an incident after the creation of that incident I want to populate the incident number in one custom field named incident which refers to the incident table (custom field created on custom table let's say xyz custom table). How can I populate the incident number on that field after the creation of that incident?
Thank You.
createIncident: function() {
var gr = new GlideRecord('incident');
gr.initialize();
gr.caller_id = "1d98e3721b8df114eb2977f58d4bcb07";
gr.assignment_group = 'e86beb761b8df114eb2977f58d4bcbdd';
gr.category = "hardware";
gr.impact = '3';
gr.urgency = '3';
gr.insert();
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:52 AM
Hi @Mark Wood ,
You can create an after insert Business Rule for incident table and in the script you can add current.(your custom field name ) = current.number; it will update your custom field with incident number
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Thank You
Swathi