- 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 06:40 AM
So the info message is being displayed but you would rather it was going into a work note on the incident?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 06:42 AM
I would want for it to still display and put a note in the worknotes.
Thanks!
- 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 06:53 AM
That added a note but it is not looking correct. this is what I am getting as the note. Any ideas?
Security Incident <a href='/sn_si_incident.do?sysparm_query=number=SIR0012525&sysparm_view='>SIR0012525</a> was created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 06:59 AM
Ah, shoot. I hadn't realized it was going to put the link. Two scenarios here:
1. Keep the link. Change the line to:
current.work_notes = "Security Incident [code]" + securityIncident + "[/code] was created";
2. Go text only, no html link. Change code to:
current.work_notes = "Security Incident " + securityIncident.number + " was created";