Add custom CMDB related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:14 PM
Hey guys, I'm trying to add a new related list which shows the list of records from 'cmdb_rel_ci' table up-to a certain table only. This related list is
on the Change Request table. So when a CI(server/switch/router etc) gets selected, the new related list must display all the related CI's ground up.
Like this : Server 'related to' Database 'in turn related to' Application 'in turn related to' Bus Application service (this is a custom CI class). This issue here is the related list is not showing the
relationships 2 levels up, but only the first level. Any idea what can be done to show all the direct and in-direct relationships in the related list?
This is the screenshot:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2017 11:59 PM
Hi Suhas,
Can we take up the old way and include .addOrCondition in the new line like current.addOr....?
One more thing i noticed , if its already on the cmdb_rel_ci table why are you using Gliderecord or array.push?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 12:06 AM
Does it matter as both are same? And the script is only using the
current.addQuery line... the rest of the lines in the script are not
used...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 01:04 AM
Hi Suhas,
Please remove the Glide Record part,
And use the line
current.addEncodedQuery('parent.sys_id='+ parent.cmdb_ci+'^ORchild.sys_id='+ parent.cmdb_ci);
removing all the other lines.. That should do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 10:25 PM
Hi Suhas,
Did you get a chance to try this maybe?