Portal announcement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I am creating records in the Announcement [announcement] table using a Record Producer.
I have added this Record Producer to multiple portals (e.g., Service Portal (SP) and HR Portal). When a user submits the Record Producer, the Announcement record gets created successfully.
However, I want to automatically associate the Announcement with the correct portal in the Portals related list (m2m_announcement_portal) based on where the Record Producer was submitted.
How can this be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @George_1
Add the following script to the bottom of your existing Record Producer script
var spAnnounce = new GlideRecord('m2m_announcement_portal');
spAnnounce.initialize();
spAnnounce.announcement = current.sys_id;
spAnnounce.sp_portal = submittedPortalSysID; // Links to the portal
spAnnounce.insert();
Refer : Creating Portal Announcements Automatically from an Outage or Knowledge Article
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
21m ago
Hi @Tanushree Maiti thanks,