Incident Number in Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 01:14 AM
Hi All,
Is there a way to get the incident number in record producer during submission.
I need to display a message(alert or addinfomessage) with Incident number to end users when incident is created from record producer.
Thanks,
Maddy
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 01:22 AM
once the record is inserted, in the insert() piece is done.
you can add a gs.addInfoMessage() to the record producer script to send a message back to the user.
gs.addInfoMessage('Your incident has now been created: ' + current.number); or something along those lines.
there's a good example on the 'Create Incident' out of the box incident record producer which reports back the number and a clickable link
var info = "This incident was opened on your behalf{0}The IT department will contact you if they need any further information{0}You can track status from this {1} {0}";
gs.addInfoMessage(gs.getMessage(info,msgArgs));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 01:32 AM
I checked in the OOB Create incident RP and also in our custom Create Incident RP, but there is no insert() used in the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2017 01:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2022 01:30 AM - edited ‎11-06-2022 01:41 AM
Record Producer Script:
var link = '<a href="incident.do?sys_id=' + current.sys_id + '" class="breadcrumb" >' + 'Click here to go to the incident.' + '</a>';
var msg = 'Incident: '+ current.number +' is created.<br/>'+ link;
gs.addInfoMessage(msg);
// Prevent redirection
producer.portal_redirect = 'javascript:void(0)'; // : should be replaced by only :