How to add list of incidents tab for one custom application with reference of business service.

Priya Bonam
Tera Expert

we have one custom app for which some related lists are there. Along with those related lists, our client is requesting us to add incident list for their tracking purpose based on business service name(which is the system name in that custom app).please suggest the way to achieve or any code for it.

1 ACCEPTED SOLUTION

Mallidi Suma
Tera Guru

Hi @Priya Bonam ,

 

In order to replicate your scenario, I created a custom table called "Bus Ticket Price Calculations" with a field called Business Service and in my Incident table Business Service Custom field is there. So the followed the below steps to show a related record on my custom table which refers to the incident table using Business Service Field

 

Step 1:-

Create a Relationships under System Definition, select your custom table in the target and incident table in the Queries from the table. Write the below code in Query with the script

 

Code:-

current.addQuery('u_busi_service', parent.u_business_service);  //parent.field name here parent is your custom table and parent. the field is your custom table Business Service Field backend name. 

//u_busi_service is your incident table Business Service Fueld backend name.

 

Please find the below screenshots.

MallidiSuma_0-1684313996478.png

 

MallidiSuma_1-1684314003194.png

 

Please mark my answer as helpful and accept it as a solution. If it helps you!!

 

Thanks & Regards,

Suma.

View solution in original post

2 REPLIES 2

Ramkumar Thanga
Mega Sage

Creation of related lists can be achieved through relationships.

 

For that you have to define the Applies to table and Queries from table.

Queries from can be incident table and applies to table should be the table where you want to make the related list variable.

Into the script section

current.addQuery('service_offering.name', parent.field_name);

 

field_name >> the system name in that custom app.

 

 

Mallidi Suma
Tera Guru

Hi @Priya Bonam ,

 

In order to replicate your scenario, I created a custom table called "Bus Ticket Price Calculations" with a field called Business Service and in my Incident table Business Service Custom field is there. So the followed the below steps to show a related record on my custom table which refers to the incident table using Business Service Field

 

Step 1:-

Create a Relationships under System Definition, select your custom table in the target and incident table in the Queries from the table. Write the below code in Query with the script

 

Code:-

current.addQuery('u_busi_service', parent.u_business_service);  //parent.field name here parent is your custom table and parent. the field is your custom table Business Service Field backend name. 

//u_busi_service is your incident table Business Service Fueld backend name.

 

Please find the below screenshots.

MallidiSuma_0-1684313996478.png

 

MallidiSuma_1-1684314003194.png

 

Please mark my answer as helpful and accept it as a solution. If it helps you!!

 

Thanks & Regards,

Suma.