How can we call 2 script includes in condition field of a UI Action.

Yash38
Kilo Guru

We have a button called Implement on Change Request form for which we have created UI action.

as the list of condition is long we created 2 script included as below : 

1. To make sure the Implement button is only visible when the next state is implement( so when the current state is schedule and next state in implement that time only implement button should be visible) (Ref, Pic1)

2. To make sure the Button is visible only to specific user.(Refer Pic2)

 

 

Condition Written in UI action : (new Implement().CheckCondition(current) == true) && new ChangeRequestStateHandler(current).isNext("implement")

 

But Dont know why its not working,

Please help me in debugging this to rectify the issue.

1 ACCEPTED SOLUTION

Marcin20
Mega Guru

Hi Snowy,

I propose to test the Script Include functions separately using i.e. the Background Script.

I suspect that ismemberof in line 8 of the Implement Script Include should rather be isMemberOf

 

Best Regards,

Marcin

 

If my answer helped you in any way, please mark this answer as helpful and correct.

View solution in original post

2 REPLIES 2

Marcin20
Mega Guru

Hi Snowy,

I propose to test the Script Include functions separately using i.e. the Background Script.

I suspect that ismemberof in line 8 of the Implement Script Include should rather be isMemberOf

 

Best Regards,

Marcin

 

If my answer helped you in any way, please mark this answer as helpful and correct.

You were right, even there was mistake at getUser().

Thank for pointing it out. It solved the issue