Approve UI Action condition not working

Kearney
Tera Contributor

Hi All,

I am trying to create a new approval UI Action for a specific user role (duplicating the existing sysapproval_approver Approve UI Action). I want to hide this new UI Action from the Change request table which I have got working using

 

RP.isRelatedList()&&parent.sys_class_name!='change_request'

 

However as soon as I add more it just shows all the time even on the change table Is there something wrong with my syntax?

 

RP.isRelatedList()&&parent.sys_class_name!='change_request' && current.state == 'requested' && (gs.hasRole('approval_admin') || isApprovalMine(current))

 

 

I have tried a few different ways however cant get this to work

Thanks

6 REPLIES 6

Can you check the dictionary value of state? It should be numeric one.

luffy3478
Tera Guru
 current.state == 'requested' && (gs.hasRole('approval_admin') || isApprovalMine(current))

is it a list action? if so, current object will not be accessible