- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:43 PM
Hello everyone!
We have a button on our all INC that allows us to create an SIR. However, the group that creates said SIR cannot read the SIR based on security permissions and cannot see the ticket in the related list. What I would like to do is simply have a note added to the INC if they create the incident that has "you have created SIR######" just so they can verify that the ticket was created.
Any help is appreciated!
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 06:45 AM - edited 12-14-2023 07:20 AM
Well then this is easy now! Love that for us.
function serverCreate() {
var securityIncident = new SecurityIncidentUtils().createFromIncident(current);
current.work_notes = "Security Incident [code]" + securityIncident + "[/code] was created";
current.update();
gs.addInfoMessage(gs.getMessage("Security Incident {0} was created", securityIncident));
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 07:05 AM
I am getting this now, thank you so much for your help
Security Incident undefined was created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 07:09 AM
Curious. Did you try both options from above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 07:12 AM
The link worked but the one with no link did not work. Hmmmm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 07:20 AM
I was assuming that the createFromIncident method returned the entire GlideRecord object which would include the number property, but I guess it's possible that it does not and it is returning the html link string only. I don't have a PDI spun up right now, so it's hard for me to check the exact working of SecurityIncidentUtils. I would say the quick solutions is to just use the html link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 07:22 AM
Love it. Thank you so much Michael!