- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 02:49 AM
Hi,
I have requirement that an announcement record should have default portal selected when it is loaded. As it is a section tab I don't know how to configure it. Can any one help me on this?
Attached is the screenshot.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 05:40 AM
Hello,
Create script like below, it should work, Its working for me
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('m2m_announcement_portal');
gr.initialize();
gr.announcement = current.sys_id;
gr.sp_portal = '81b75d3147032100ba13a5554ee4902b';
gr.insert();
})(current, previous);
Please Mark ✅ Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg
Regards
Sulabh Garg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2022 04:16 AM
Hello sulabh,
With the above BR a new announcement is defaulting to ESC portal after saving. But, while creating an announcement, before saving if we select any other portal, after saving it is populating both portals. Which is not expected one. So I have given a condition in BR "current.sp_portal.nil()" it is not working. Then I have given if condition as below, then also not working. Can you please help me on this as well.