How can I differ between list view and form view in UI action?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 01:02 PM
We've been using a script that discerns whether a UI action is initiated from the list view or form view. However, recently, "typeof g_list" is returning "object" instead of "undefined" on the form view. Is there an alternative method to determine if it's a list view while on the form view?
Is there another way to determine if a call is being from the list view or the form view, other than swapping if and else if to make the function work?
if (typeof g_list != "undefined") {
// typeof g_list is Object on both form view and list view so call never enters into else if section
return g_list.getChecked();
} else if (typeof g_form != "undefined") {
return g_form.getUniqueValue();
}
0 REPLIES 0