- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:22 AM
Hello, can someone help me with my next question?
Is it possible to generate an automatic announcement that is displayed in the service portal when an incident is critical?
which when displayed, shows the date and incident number
If it is possible, how can this be done?
I hope someone can help me with my doubt
Thank you
regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 10:03 AM
You can create Announcement dynamically when Incident is converted to a Major incident as you want. BR which I have shared above will do the same thing and will create a Announcement record and also at the same time will create a Relationship between Announcement and the table which links the Announcement to Portal on where it should be displayed.
Posting the screenshot of the BR as well:
If you are unsure on Portal sys id then Navigate to Portal module and open your portal record and then Right click on the header and copy sys id . For example see screenshot below:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:39 AM
Hi Williams,
I think its not possible, because we can create Announcements dynamically.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:58 AM
In conclusion, Announcements can only be created manually, correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2022 09:59 AM
Hi,
What you can do here is, create a Business Rule on Incident Table and use the script below:
BR Details:
Table Name: Incident
When: After Insert and Update
Condition: Major Incident State is Changes To proposed or Accepted
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
createAnnouncement();
function createAnnouncement(){
var gr = new GlideRecord('announcement');
gr.initialize();
gr.name = 'Value you want to set';
gr.title = 'Value you want to set';
gr.summary = 'Value you want to set';
var success = gr.insert();
if(success){
createPortalEntry(gr.sys_id);
}
}
function createPortalEntry(announceID){
var gr1 = new GlideRecord('m2m_announcement_portal');
gr1.initialize();
gr1.announcement = announceID;
gr1.sp_portal = 'Sys id of Portal where you want to show this';
gr1.insert();
}
})(current, previous);
Just replace the value in placeholder above and this should work for you.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2023 03:05 AM
Hello shloke04,
Thanks for sharing your knowledge, when promoting the incident I expected that the name of the Announcement and Title would be filled in. In this way we can trigger the Announcement to show up in the correct way.
After promoting the INC it asks for a *Worknote.
I'm currently struggling to find which values should be filled in to do so.
Any advice?