How to set default filter for Add affected CIs popup window?

dianemiro
Kilo Sage

Hi Everyone,

We have a related list under Change Request called Affected CI then under this related list, we have add button. Upon clicking the Add button, a window will popup (see below). How can I set the value of the Configuration Class to always Configuration Item for all users then how can I set the default filter to Company is the same as the company under change request and how can I hide the breadcrumbs as well. Thank you in advance.

find_real_file.png

Regards,
Diane

1 ACCEPTED SOLUTION

dianemiro
Kilo Sage

I was able to do this by modifying AssociateCItoTask script include by adding the following lines:

 

var gr_chg = new GlideRecord('change_request');
		if(gr_chg.get(chgReqId)){		
		url.set("sysparm_query", 'install_status!=7^company=' + gr_chg.u_customer + '^ORnameLIKEgeneric');

Thanks everyone who helped! Marking this as closed.

View solution in original post

5 REPLIES 5

Calvaresi E_
Giga Expert

Hi Diane,
just click on the hamburger menu, just above the filter, choose Filters and edit it.

find_real_file.png

 

Let me know if it helps.

Hi Edoardo,

Thank you for your response. But I want it to be available for all users. It should be the default filter for this related list.

Regards,
Diane

Harshinya1
Mega Guru

Create a filter and set it as default filter as shown in the snippet

find_real_file.png

hope this helps

dianemiro
Kilo Sage

I was able to do this by modifying AssociateCItoTask script include by adding the following lines:

 

var gr_chg = new GlideRecord('change_request');
		if(gr_chg.get(chgReqId)){		
		url.set("sysparm_query", 'install_status!=7^company=' + gr_chg.u_customer + '^ORnameLIKEgeneric');

Thanks everyone who helped! Marking this as closed.