How do I trigger a Business Rule with a UI Action?

RosMcG
ServiceNow Employee
ServiceNow Employee

Hey all!

I'm very new to the ServiceNow world. 🙂

I'm trying to trigger a business rule using a UI Action. The business rule is working if do things manually, but the UI Action is not.

Context:

Using a UI Action to update Case Category to "Product Issue".
When Case Category updated to "Product Issue"
Trigger business rule
before update
to add specified users to a watch list and generate a notification with a link to the actual Case.

Issue:

The UI Action is not updating the Case Category at all.
But, when I manually update the Case Category, the business rule is working, except for the link to the case.

Ask:

How do I fix my UI Action? (It's about making the user experience easier for the Service Agent and cross-team collaborators).
How do I get the link to the Case in the notification?

Format:

images attached.

Thanks in advance! Appreciate any assistance.

 

Roslyn 

1 ACCEPTED SOLUTION

RosMcG
ServiceNow Employee
ServiceNow Employee

Thanks all!

Can you believe it worked when I changed the update value to '4', rather than 'Product Issue'?

Thanks for your input though.

🙂

View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You don't need to trigger business rule from UI action

Instead you can add code in UI action below to add users to watch list.

Watch list contains comma separated values of user's sys_id 

current.watch_list = "a8f98bb0eb32010045e1a5115206fe3a,7e82abf03710200044e0bfc8bcbe5d32";
current.update();

Regards,

Sachin

 

 

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Roslyn,

Under when to run tab in a business rule can you check if the update checkbox is set to true?

 

- Pradeep Sharma

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you check few things?

1) Is the UI action script working? try by adding logs

2) with which user this is not working?

Regards
Ankur

 

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

RosMcG
ServiceNow Employee
ServiceNow Employee

Thanks all!

Can you believe it worked when I changed the update value to '4', rather than 'Product Issue'?

Thanks for your input though.

🙂