does current work in ui action

Rd
Kilo Explorer

does current work in ui action, what API i should use instead of current so that i get the same functionality

7 REPLIES 7

asifnoor
Kilo Patron

Yes, current will work in UI action.

You can use Current in script and condition fields of UI action.

Refer to existing OOTB UI actions where current is used for better understanding.

Ref: https://docs.servicenow.com/bundle/london-platform-administration/page/administer/list-administration/task/t_EditingAUIAction.html#t_EditingAUIAction

Kindly mark my answer as correct and helpful if this answers your question.

Vivektietsood
Tera Guru
Tera Guru

I just tried it and current object was not available in UI action. So unless you have a client interaction as a part of this UI action, please use business rule and not UI action. Its much easier, and gives you flexibility on when to run it. 

In case you need client interaction and server script both as a part of UI action: Please refer to the following link:

 

https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/

 

Please mark my answer helpful if it helped you.

Prithviraj Howa
Kilo Expert

Hello,

 

"current" is only available at server-side.

For client-side access to the current record, use g_form.

 

Please mark reply as Correct/ Helpful, if applicable. Thanks!

Warm Regards,

Prithviraj Howal

SNOW Developer

I tried it in UI action today without client checkbox ticked and current was not available.