How to restrict only ITIL user to edit filter condition ?

akhil reddy2
Mega Contributor

How to restrict only ITIL user to edit filter condition ? 

Incident form in Related list under on specific related list where ITIL user can edit the filter but for those filter condition should be Read only for ITIL role then others

1 ACCEPTED SOLUTION

An ITIL user, when you click on the edit button of Attached knowledge related list, by default it shows
you the published articles. However, the ITIL user can change the filter and select any article or block and add to the incident. Please restrict the filter edit for the TIL role.

this is the requirement 

 

View solution in original post

10 REPLIES 10

OOB only users with ITIL role can see related list
End users can't see related list
What other roles are trying to edit this filter, if you can specify ?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you will require UI script to hide the filter when somebody clicks the Edit button other than itil

Note: it requires DOM manipulation which is not recommended

here is the solution for this

Hide filters in related list

Regards
ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi I don't want ITIL USER to edit this filter it should be read only

can anyone suggestfind_real_file.png

Hi,

link with solution I already shared; just enhance it

Sharing the solution again with script

1) create UI script with type Desktop, Global = True

2) script here

Ensure you give correct table name here from where you are clicking the Edit button

Example: I am clicking Edit button from incident form so I gave sysparm_collection=incident and I see problem records when I clicked Edit button i.e. Related list of Problem so I gave sys_target=problem

find_real_file.png

addLoadEvent(hideFilter);

function hideFilter(){

	if(g_user.hasRoleExactly('itil')){
		var url = document.URL;
		if(url.indexOf('sys_target=problem') > -1 && url.indexOf('sysparm_collection=incident') > -1){
			document.getElementsByClassName('col-sm-offset-2 col-sm-8 m2m_filter_container')[0].style.display='none';
		}
	}
}

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@akhil reddy 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader