- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 04:49 AM
I need to get the related list sysid in the Client UI action Script so that based on it I can do my functionality.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 09:08 PM
g_list.getTableName() is returning the TableName not the sysid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 06:02 AM
Hello,
In ServiceNow, if you're working with a Client UI action script and you need to access the related list sysid, you can use the g_list variable. This variable provides access to information about the related list.
Here's an example of how you can retrieve the related list sysid in a Client UI action script:
javascript
function yourClientActionFunction() {
var relatedListSysID = g_list.getTableName(); // This will give you the sys_id of the related list
// Your functionality using the related list sys_id goes here
}
In this example, g_list.getTableName() retrieves the sys_id of the related list. You can then use this sys_id to perform your desired functionality.
Remember to replace yourClientActionFunction with the actual name of your function, and customize the functionality based on your specific requirements.
Please mark helpful or correct if applicable.
Thanks & Regards,
Sayali Gurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 09:08 PM
g_list.getTableName() is returning the TableName not the sysid.