Change related list in in incident form when records have the same parent

Alex D Great
Tera Contributor

Hello All,

I have a requirement when change is created from incident it should be shown under "change request" related list. Both the incident and change request will have the same parent, which is case. 

Any idea how to do this?

1 ACCEPTED SOLUTION

AnubhavRitolia
Mega Sage
Mega Sage

Hi @Alex D Great 

 

As you have additional condition, I would suggest you to create new Related list for it.

 

1. Navigate to System Definition > Relationship.

2. Create new record with Name = Change Request, Applies to Table = Incident, Queries from table = Change Request.

3. Query with script as below:

 

current.addQuery('sys_id', parent.rfc);
current.addQuery('parent',parent.parent);
current.addEncodedQuery("parent.numberSTARTSWITHCS");

 

4. From Incident form, configure this new Related List and add on the form.

 

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

View solution in original post

6 REPLIES 6

AnubhavRitolia
Mega Sage
Mega Sage

@Alex D Great 

 

This is little confusing. Can you be little more elaborate with example?

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Hi @AnubhavRitolia 

Yes I can. 

My challenge is similar to this one, except my parent is case, and not incident: https://www.servicenow.com/community/it-service-management-forum/change-request-related-list/m-p/852...

To further explain, 
-Case is parent of inc

AHN_0-1668085922649.png

-Same case is parent of change. Change is opened from inc, and is related

AHN_1-1668086034994.png

-Inc and case is visible i related lists in change

AHN_2-1668086093095.png

-case is visible in incident related list but change is not

AHN_3-1668086151894.png

 

AnubhavRitolia
Mega Sage
Mega Sage

Hi @Alex D Great 

 

As you have additional condition, I would suggest you to create new Related list for it.

 

1. Navigate to System Definition > Relationship.

2. Create new record with Name = Change Request, Applies to Table = Incident, Queries from table = Change Request.

3. Query with script as below:

 

current.addQuery('sys_id', parent.rfc);
current.addQuery('parent',parent.parent);
current.addEncodedQuery("parent.numberSTARTSWITHCS");

 

4. From Incident form, configure this new Related List and add on the form.

 

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Again, thank you very much for your help @AnubhavRitolia 🙏