List Action Does Not Trigger Business Rule on Update

Yoeri
Tera Contributor

Hi everyone,

I'm having an issue where a Business Rule doesn't trigger when I use a custom List Action to update records. Here's what I'm trying to do:

  1. I created a List Action that updates the state field to "success" for selected records in a table. This works fine
  2. I also created an after-update Business Rule that triggers when the state changes to "success" and displays a message using the basic configuration. I just want a confirmation to the user saying it worked.

The Business Rule works perfectly when I manually change the state to "on tape" in the UI (e.g., in the list view in my UI Builder related list). However, it doesn’t trigger when the state is updated via the List Action. 

 

I have tried to change my list action to update the selected rows in two ways, namely current.update() and also via a GlideRecord, querying the same table with the sys_id and updating that record. Without success. 

 

p.s. Also, adding a message in the server side list action does not show.

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Yoeri 

can you share the list ui action configuration screenshots and the script here?

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

Runjay Patel
Giga Sage

Hi @Yoeri ,

 

Share your UI action configuration.

 

-------------------------------------------------------------------------

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
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

Yoeri
Tera Contributor

Implementation Details

  1. Action Configuration:

    • Type: List Action
    • Execution Scope: Server Script
    • Record Selection: Required
    • Active: Yes
  2. Script Explanation: Initially, I used a simplified script:

     
    current.state = 'success';
    current.update();
     
    While this updated the state field as expected, it did not trigger the associated Business Rules 

 

To address this, I implemented the following script:

var gr = new GlideRecord('tablename');
if (gr.get(current.sys_id)) {
gr.state = 'success';
gr.setWorkflow(true);
 gr.update();
 
3. Result: Still nothing

Yoeri
Tera Contributor