- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 08:52 AM
Hi,
we are creating a List Banner Button under the Related Link Affected CI's as shown in screenshot.
Here it is referring to a custom table called "u_ci_m2m_server", in this table there are 2 fields one is Task(Reference field) and other field is CI(reference field pointing to cmdb_ci_server)
Now when user click on this button, it should get the current incident to be mapped with field TASK and current configuration item selected on the incident.
since I am creating the UI action on task_ci table, I cannot directly use the current.sysid to get the sys_id of the incident. How can I relate and make the incident to map with Task field in custom table.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 10:25 AM
Thanks Prasad,
What actually I was searching is this below code and it is very useful for us to find the parent record sys_id in List banner UI actions under related list.
Actually when there are M2M tables who need the parent sys_id then the below code will help them to get the parent sys_id on server side UI action.
This is Undocumented.
var uri = action.getGlideURI();
var path = uri.getFileFromPath();
var collectionId = uri.get('sysparm_collectionID');
gs.addInfoMessage(collectionId);
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 09:54 AM
Hi,
You are merging two things
List Banner Button and Related Links.
I will suggest to create it as Form link on Incident form where you can take current ci and task and add in your custom table.
It will look like below
Hope this helps 🙂
Please mark my answer correct and helpful if applicable.
Thank you
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2021 10:25 AM
Thanks Prasad,
What actually I was searching is this below code and it is very useful for us to find the parent record sys_id in List banner UI actions under related list.
Actually when there are M2M tables who need the parent sys_id then the below code will help them to get the parent sys_id on server side UI action.
This is Undocumented.
var uri = action.getGlideURI();
var path = uri.getFileFromPath();
var collectionId = uri.get('sysparm_collectionID');
gs.addInfoMessage(collectionId);
Thank you.