Need to Hide UI Action which is visible in Workspace

sreeshsurendran
Tera Guru

Hi all,

 

The requirement is to hide UI action on my Case record when Resolution Code is "Expired" or "Abandoned". I have added the below conditions in the condition builder of UI Action, but seems not working.

 

Script:

 

(current.resolution_code != 28 ||  current.resolution_code!= 29 && new global.StateFlow().validFlow(current, 'adc468f4979fb918dc87feae2153af14', 'manual'));

 

Any leads for the above will be helpful.

 

Thanks,

Sreesh Surendran

6 REPLIES 6

Shruti
Mega Sage
Mega Sage
(current.resolution_code != 28 &&  current.resolution_code!= 29 && new global.StateFlow().validFlow(current, 'adc468f4979fb918dc87feae2153af14', 'manual'));

Ankur Bawiskar
Tera Patron
Tera Patron

@sreeshsurendran 

did you try to remove the condition 1 by 1 and debug and see which is not working?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,

 

Have tried removing one condition and could see it was working.

 

(new global.StateFlow().validFlow(current, 'adc468f4979fb918dc87feae2153af14', 'manual') && (current.resolution_code != 28));

 

Thanks,

Sreesh Surendran

@sreeshsurendran 

Glad to know.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader