How to update field values in the business role?

shiz
Tera Contributor

shiz_0-1731404707541.png

I want to update the value of 'current. week. stats_on' to the 'release_date' field. How should I write it?

According to the writing style in the picture, it seems that the result has not been updated!

 

3 REPLIES 3

Shruti
Mega Sage
Mega Sage

Hi,

If you are using script make sure field names are correct

current.u_release_date = current.u_week_starts_on;

 

OR 

It can be done by setting field values in Actions

For ex:

Shruti_0-1731405674782.png

 

Collin Romeijn
Kilo Guru

Hi Shiz,

I think you are missing the current.update() command at the end. BUt be carefull because .update() will trigger BR updated rules.

Also see Current.update in Business Rules - ServiceNow Community

Kind Regards,

Collin

Rajesh Mushke
Mega Sage
Mega Sage

Hi @shiz,

 

You should put some logs in the BR script for each line and see where it is stopping. this way you can easily find out the issue.

Make sure BR type should be onBefore insert/update based on your need. 

 



Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke