I want to show the incident based on description to the particuller groups

Barathk
Tera Contributor
Hi Team,
I have requirement the incidents contains short description start with exit asset details to the two group.
for this I have tried with the query BR.
when to run to condition is task type is incident and the script is below.
please help someone for this.

if
((gs.getUser().isMemberOf('CrpA')) && (gs.getUser().isMemberOf('CrpPO'))) {
current.addEncodedQuery('short_descriptionSTARTSWITHExit Asset Details');
}
6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Barathk

there is already 1 Query BR on incident table.

Did you add logic to same or created a new one?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 

 

Thansk for the response.

 

If posiable can you please help me with the script

AbdulNow
Tera Guru

Hi @Barathk I hope you are doing well, 

 

Create a new Business Rule for query, and use the screenshot below as a sample on Script.

 

Screenshot 2024-11-06 at 4.29.02 AM.png

 

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Wahid

Barathk
Tera Contributor

Hi @AbdulNow 
Thanks for the response 
The above shared script is not working.