Create a Related List on incident Form for Product Instance

Nico12
Mega Sage

Hi,

 

We have a reference field on incident form called Product Instance.

We need to make the Product instance appear in a custom related list.

I have created a relationship but i am not able to retrieve the Product instance from the incident.

I think i miss the logic here.

 

Applies to table : Incident

Queries from table : cmdb_ci_service_auto

 

Query with : 

 

 

(function refineQuery(current, parent) {

    // Add your code here, such as current.addQuery(field, value);
    current.addQuery('u_application_service', parent.sys_id);

})(current, parent);

 

 

regards,

1 ACCEPTED SOLUTION

Nico12
Mega Sage

Nevermind, i was interverting query table and applies table.

 

(function refineQuery(current, parent) {

    // Add your code here, such as current.addQuery(field, value);
    current.addQuery('sys_id', parent.u_application_service);

})(current, parent);

View solution in original post

2 REPLIES 2

Nico12
Mega Sage

Nevermind, i was interverting query table and applies table.

 

(function refineQuery(current, parent) {

    // Add your code here, such as current.addQuery(field, value);
    current.addQuery('sys_id', parent.u_application_service);

})(current, parent);

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Can you show a screenshot of the fields on incident and cmdb_ci_service_auto 

What table is this field on? -> u_application_service

-Anurag