Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to check if UI Action is fired from the form or list?

Tom Sienkiewicz
Giga Sage

Hi,

I have a Client UI Action that is available both as a form button and a list context menu.

What I' having trouble with is the gsftSubmit() function and any of the g_form functions are not available if run from e.g. a related list.

Do you guys (and gals) have any ideas how I might check from where the UI Action was triggered?

typeof rowSysId returns a value in both cases, so no use

g_form === undefined also does not seem to work.

I would like to write an if block so that if the UIA is triggered from a list it will run different client code than from a form.

Any help much appreciated,

Thanks!

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee

You could just check the url of the frame for _list.


View solution in original post

5 REPLIES 5

Thank you ! Reading this solution in 2023. Life Saver!