- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 09:05 AM - edited 06-07-2024 09:07 AM
Hi,
I set a BR to create an announcement automatically once a P1 is created in the service portal...I just haven't been able to include within the script the command to set the announcement's display style as urgent (red color) .
I tried gr.display_style = 'Urgent'; or 'urgent' but it did not work as expected, it does create the announcement, but it does not prompt in the service portal
and my code is the following
Business rule
Details
When to run, tab
After
Insert, Update
Filter condition
Priority | is | 1 - Critical
Assignment group | is | Network
Actions, tab
none
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 02:40 PM
Hi @EduardoH,
Haven't gone through the entire code but the Display style field is a reference type.
So I think you can either do one of the following:
- gr.setDisplayValue('display_style', 'Urgent'); OR
- gr.setValue('display_style', '339ea11ae7d4030075c2a117c2f6a9cf');
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 02:58 PM
As suggested by James you need to either set display value or sysid, as display style is a reference field.
You also need to set few more fields.
Such as Public as true, type, from date and to date.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 02:40 PM
Hi @EduardoH,
Haven't gone through the entire code but the Display style field is a reference type.
So I think you can either do one of the following:
- gr.setDisplayValue('display_style', 'Urgent'); OR
- gr.setValue('display_style', '339ea11ae7d4030075c2a117c2f6a9cf');
Cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2024 02:58 PM
As suggested by James you need to either set display value or sysid, as display style is a reference field.
You also need to set few more fields.
Such as Public as true, type, from date and to date.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 08:02 AM
Thank you!!!
It is working now, and love the suggestions!
Gracias desde Costa Rica!!!