Bug with UI action's condition field

newhand
Mega Sage

HI everyone.

I created a UI action with the condition below, and the button shows.

 

 

(RP.getParameterValue('sysparm_record_target')=='sn_customerservice_case')

 

 

Then I changed the condition, and the button disappeared.

 

 

(RP.getParameterValue('sysparm_record_target')!='sn_customerservice_case')

 

 

 

Here, it seems the condition field works as expected.

But, when I clicked the button, the message 'Action not authorized' shows.

I don't know why.

The condition field is used to judge if the button should show or not.

Why can it affect the running of the logic script?(In my case, there is only gs.info() in my script.)

 

Really need help!!!