Review button visibility on Change request

Pallavi65
Tera Contributor

Hi all,

On the three types of change request (Normal, Standard, Emergency), I want to make Review button to be visible on the form only when all the corresponding change tasks are closed. Can someone let me know how can we achieve this?

 

Regards,

Pallavi

1 ACCEPTED SOLUTION

Martin Ivanov
Giga Sage
Giga Sage

Hi,please create the following script include:

find_real_file.png

 

 

then please edit the Review UI Action condition as per the screenshot:

find_real_file.png

Please Mark Correct AND Helpful. Thanks!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

View solution in original post

8 REPLIES 8

Martin Ivanov
Giga Sage
Giga Sage

Hi,please create the following script include:

find_real_file.png

 

 

then please edit the Review UI Action condition as per the screenshot:

find_real_file.png

Please Mark Correct AND Helpful. Thanks!


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

Hello Martin,

 

I have implemented the same in my instance. But I am unable to see the Review button even after the closure of the tasks. 

I checked in scripts back ground, by taking the condition in the Review button with the current change. It is giving false. Only when the condition gives true, the button will be visible.

 

So, please help me here

 

 

Regards,

Pallavi

 

try to remove the second part of the condition:

&& new ChangeFormUI(current).isReviewAvailable()

let me know if it works


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

No Martin. I removed the second part and checked. It's not working.

For testing purpose, in the scripts background,

var gr = new GlideRecord('change_request');

gr.get('sys_id)');

var res = -----pasting the UI button condition-------

gs.print("Result is "+res);

 

So here it is giving false only.

 

 

Regards,

Pallavi