The CreatorCon Call for Content is officially open! Get started here.

Automatic announcement, Display style as Urgent

EduardoH
Tera Contributor

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

post.png

2 ACCEPTED SOLUTIONS

James Chun
Kilo Patron

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

View solution in original post

SanjivMeher
Kilo Patron
Kilo Patron

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.

SanjivMeher_0-1717797488390.png

 


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

3 REPLIES 3

James Chun
Kilo Patron

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

SanjivMeher
Kilo Patron
Kilo Patron

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.

SanjivMeher_0-1717797488390.png

 


Please mark this response as correct or helpful if it assisted you with your question.

EduardoH
Tera Contributor

Thank you!!!

It is working now, and love the suggestions!

EduardoH_0-1718031688789.png

Gracias desde Costa Rica!!!