Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jim Coyne
Kilo Patron
Included in the Developer Toolbox Update Set available on Share (link to Share in the post).

 

Here's a Relationship that allows you to add a Related List to the UI Page form that shows the Access Controls defined for that particular page.  Makes it easy to see if you have Access Controls defined for the UI Page or not.

 

find_real_file.png

 

To add it, create a new Relationship record (System Definition \ Relationships) with the following details:

Name:               Access Controls
Applies to table:   UI Page [sys_ui_page]
Queries from table: Access Control [sys_security_acl]
Query with:

 

(function refineQuery(current, parent) {
	//Written by Jim Coyne
	//https://community.servicenow.com/community?id=community_user_profile&user=8352da29dbd81fc09c9ffb651f9619c7
	//https://community.servicenow.com/community?id=community_blog&sys_id=2620df55db08d1900d48db85ca961980

	//allows admins to see a list of Access Controls defined for the selected UI Page
	//the "Access Controls" Related List must be added to the UI Page form

	//add the query
	current.addEncodedQuery("type=ui_page^name=" + parent.getValue("name"));

})(current, parent);

 

Once you create the record, add the Related List by right-clicking the form header and selecting "Configure \ Related Lists" menu item and move the "Access Controls" item from the "Available" box over to the "Selected" box and click "Save".

 

If you want to remove the "New" button, right-click a list column header and select the "Configure \ List Control" menu item and check the "Omit new button" checkbox and then click the "Update" button.

 

I've attached an XML file so you can just import it into your instance.  As always, try it out in your company's development instance first, or better yet, your own personal development instance.