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

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

 

I checked and it seems to be available but not sure today when I was trying it was not showing up.

Hello,

 

Without client checkbox ticked you can use current like this:

 

gs.addInfoMessage(current.caller_id.name);

action.setRedirectURL(current);

(You will get current caller name)

 

 

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

If not then please let me know.

Warm Regards,

Prithviraj Howal

SNOW Developer

 

 

G24
Kilo Sage

For UI Actions the "current" object (whatever record/form the UI action was run from) IS AVAILABLE in the "Condition" box, which is run on the server side to decide whether or not to render the UI Action (button) before the form is sent up to the client.

But WITH "Client" checked, the "current" object is NOT available in the **Script** field.  In that case the code is run in the browser and you do not have easy access to the current record, dot walking, etc.

Someone correct me if I'm wrong here.  Cheers.