UI Actions

When you just need a button

Last modified 2025-07-08

Jace Benson

Docs

UI actions are strange because they can be both client callable and server callable. What do I mean by that I mean you can have a UI action a button or link that does just client side stuff you can have another UI action that does just server side stuffyou can have a third action that does both client and server side stuff.

Because of thisthese run in memory on the client and on the server. Depending on the UI you're working in they also need to be called differently for instance in workspace they have a whole different script field versus in core UI.

To run this code server side you need the check for the presence of window if window doesn't exist its running server side.

Mark Stanger has a great post about this, "Client & Server Code in One UI Action" that's over a decade old.