How to give the reverse condition of UI action in BR condition

Roshini
Giga Guru

Hi Team,

I have the below condition in one of  my Ui action, I need one Business rule for the same table to run if these conditions are not true. Can someone help me to fix the script for making this as reverse.

Existing condition of UI action :- gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isCancelAvailable() && new ChangeFormUI().checkTask(current)

1 ACCEPTED SOLUTION

Hi @Roshini ,

 

control the task ui action, put condition if task is in PIR don’t display cancel button to cancel the task.

 

Business rule and cancel change let it run as expected.

 

Please Mark Correct if this solves your query and also mark Helpful if you find my response worthy based on the impact.

View solution in original post

4 REPLIES 4

Runjay Patel
Giga Sage

Hi @Roshini ,

 

business rule run on crud operation where ui action run after clicking on.

 

help me with objective which tying to achieve then I can help. Based on your input I am not able to figure it out what you are trying to achieve.

Hi Runjay Patel,
I have a Ui action name "Cancel change" and once this button is clicked it should cancel all the associated task. and the condition for the Ui action is " gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isCancelAvailable() && new ChangeFormUI().checkTask(current)"
but there is a Business rule which is running to prevent the cancellation of PIR task of the change.
also we have a Ui action in change task "cancel" which allows the respective task state to move Cancelled

my requirement is if someone is able to cancel the change via the UI action the associated tasks needs to be cancelled. but is some is tryong to cancel the task from task Ui action the business rule should work.

Hi @Roshini ,

 

control the task ui action, put condition if task is in PIR don’t display cancel button to cancel the task.

 

Business rule and cancel change let it run as expected.

 

Please Mark Correct if this solves your query and also mark Helpful if you find my response worthy based on the impact.

HIROSHI SATOH
Mega Sage

How about this?

!(gs.hasRole('itil,sn_change_write') && new ChangeFormUI(current).isCancelAvailable() && new ChangeFormUI().checkTask(current))