I created custom related list in project which is not showing breadcrumbs (filter links)..

Datha prasadred
Tera Contributor

Hi Team,

 

when i am working on ITBM i have created custom relationships and added into the project i am getting accurate list of records but when i am trying to  open breadcrumbs  in new window it is showing all records not related to parent 

i need to see the records which are related to the parent record only please help on this...please find the attached screenshot.

 

I am using this code :

(function refineQuery(current, parent) {
    if ((parent.instanceOf('pm_project') && parent.parent.nil())) {
        var project = new GlideRecord('pm_project');
        project.get(parent.getValue('sys_id'));
        if (current.isValidField('u_projectproject')) {
            current.addQuery('u_projectproject', project.getValue('top_task'));
Dathaprasadred_1-1703056701666.png

I need to see my records which are linked to specific project only like below.

 

Dathaprasadred_2-1703056785304.png

 

 
1 ACCEPTED SOLUTION

Hi,

Looks like you have Project field on your custom Lesson learned table.

No need to create custom relationship, you can add related list by configuring related list.

When you add any reference field on any table it create relationship and that can be adde on your forms as related list.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

5 REPLIES 5

Maik Skoddow
Tera Patron
Tera Patron

Hi @Datha prasadred 

unfortunately, this is the expected behavior for relationships in ServiceNow. You cannot right-click on the breadcrumbs and use option "Open in new window" for relationships.

"Open in new windows" is only working for real related lists when records have references to parent records.

Maik

Datha prasadred
Tera Contributor

Hi @Maik Skoddow ,

I am able to use"Open in new window" for relationships.but not able to get specific project records..

Dathaprasadred_1-1703062301507.png

 

I have created reference to parent records  in related list please see the attached screenshot..

 

Dathaprasadred_0-1703062158437.png

 

Hi @Datha prasadred 

if there is a child-parent relation, as I can see in your screenshot, then there is no need to create a relationship. Just add the related list to the project form. Then you will be able to open the related list in a new window.

Maik

Hi,

Looks like you have Project field on your custom Lesson learned table.

No need to create custom relationship, you can add related list by configuring related list.

When you add any reference field on any table it create relationship and that can be adde on your forms as related list.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande