UI action is working in form view but not working in LIST view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 02:25 AM
Hi All
My UI action is working on the form view but not working in the list view. Can someone please help me fixing this issue. Below is the code I have written in UI action.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 02:41 AM
@Prasnajeet1 Since you are using g_form in your UI Action script, it will not work in case of list view, list view contains more than one record and hence g_form.getValue('close_notes') and g_form.getUniqueValue() will not be available on list view. The same UI Action works on form as the same is available there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 02:54 AM
Hi Sandeep
Thanks for your quick response. Could you please tell me what need to be use instead of g_form or g_form.getUniqueValue(). If possible could you please change on the above mention script please. It will be very help for me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 03:32 AM
Please refer to the solution posted by author here https://www.servicenow.com/community/now-platform-forum/create-ui-action-in-list-and-form-view/m-p/1..., basically he is using an onClick client script function and identifying if the input is coming from the g_list or g_form. You can modify your client side code accordingly.