Creating Cancel Change button and making it visible only till some stage

prudhvig
Tera Expert

Hi,

I am trying to create a Cancel Change button which has to be visible only in four states of Change. Those states are New, Assess, Authorize and Schedule. When, state reaches Implement, it should not be shown. And, when any user selects the Cancel button, the work notes should be made mandatory before cancelling.

I can do this by Creating a UI Action for Cancel button. Then, for making visible and mandatory, I could create UI policies. But, how do I create UI Policies for buttons? Cant I achieve the entire thing in one go?

Please suggest. Thanks in advance.

9 REPLIES 9

anurag92
Kilo Sage

For making it visible you should use Condition field of Change, Mark it as Client and make work notes field mandatory in the code itself.



find_real_file.png


Hi Anurag,



Sorry for forgetting to add a point in my question. The cancel button has to visible only to :



Opened by


Assignment group


CAB.



So, what should we do in this case ? Thanks in advance.


anurag92
Kilo Sage

Add this in condition:



gs.getUserID() == current.opened_by || gs.getUser().isMemberOf(current.assignment_group) || gs.getUser().isMemberOf('CAB');


Should my condition be this way ?



gs.getUserID() == current.opened_by || gs.getUser().isMemberOf(current.assignment_group) || gs.getUser().isMemberOf('CAB'); current.state=='new'||current.state=='assess'||current.state=='authorize'||current.state=='scheduled'



So multiple conditions should be separated by ; . Am I right?