Business Rule to update Parent Demand field

Michelle B
Tera Guru

Hello!

I was hoping someone could assist me with what I'm doing wrong. 

I created a Business Rule on the Demand task table. The goal of my business rule is to update the "T-Shirt size" field on the Demand task's Parent Demand when the Demand task is closed. 

Below are screenshots of the Business Rule:

find_real_file.png

find_real_file.png

 

To test the business rule:

1. I changed the State of a DMNTSK to "Closed Complete" and saved the record. 

2. I then went to the Parent DMND of the DMNTSK and see that the "T-Shirt size" field still has not changed to "L- Large". 

Any help is appreciated.

Thank you!

Michelle

3 REPLIES 3

Prasad Pagar
Mega Sage

Hi,

Did you checked if any other rule is running which is not allowing it to get set via this BR?

Check history of Parent DMND to check if at all changed T Shirt size

Thank you
Prasad

Hi Prasad, 

Thanks for the quick response!

I checked the history of the Parent DMND, and do not see any recent changes to the "T-Shirt size" field. The one change to this field was last month and I don't see any changes made to the field today. 

find_real_file.png

You need to write afte Update BR on Demand task table. Condition to be added : State is Closed

Then go the Advanced tab to write below script

 

(function executeRule(current, previous /*null when async*/) {

var rec = new GlideRecord('name_of_the_parent_table');
       
rec.t_shirt_size_on_parent_table = current.t_shirt_size;

})(current, previous);