Skip to main content

ServiceNow - Create a custom sys properties page

 https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715835

 

Browse to the following location on the instance: System Properties -> Categories.

A list of System Property Categories should appear.  Click the New button to create a new Category.

Fill out the following fields on the new System Property Category record:

Name: This is the name for the category as it will displayed in the list and in associated lists for properties.  It should be the exact same as a CategoryName specified in the URL in the Arguments field of the module created in the steps above.

Title: This will be text that will be displayed above this grouping of properties on the page.  This is an HTML editor field so can include HTML formatted text and can be as lengthy as needed, to include details regarding the properties in this section.

 Example New System Property Category

Once satisfied with the Category record, click the Submit button to save this category to the system.

Repeat for each category that is to be included on the system properties page.

 

Populate the Properties Categories

The next step is to populate each Category that is appear on the page with the actual properties that should appear in that properties category section.  There are several ways this can be done, including the following which is most efficient if you are aware of the specific system property names you want to add to the category:

Ensure to be logged into the instance with an account having admin rights to the instance.

Browse to the following location on the instance: System Properties -> Categories.

A list of System Properties Categories will appear.  Locate one of the System Properties Categories you have just added and which you want to appear on the System Properties page.  Click the name of the record to open it.

Scroll to the Properties related list for the record.

Click the Edit button associated with this Related List.  A slushbucket form should appear with a list of all the system properties on the left.  Select from this list the properties you want to associate with this System Properties Category (and which will subsequently appear on the system properties page) and use the appropriate controls to move these property names to the right side.  The order they appear in this list will directly correspond to the order in which they appear under this Category section heading in the resulting properties page.

 Associating Properties to a Category

Create the Application Module

As mentioned, the first step is usually to create and configure the application "Module" which will open the properties page.

To do this, browse to the following location on the instance: System Definition -> Modules.

This should cause a list of modules to display.  To create a new module, click the New button.

Populate the New Module form with the applicable data:

Name: The name is how the actual Module will display in the Menu Navigator, so a name that is descriptive of the types of properties that will be on the page is probably best (i.e. Quote Properties).

Application Menu: This should contain the upper level Application menu on which this Properties Page menu option should be associated to.  Use the Search button to search for and select the needed value from all the Application Menus on the system.  If this value is left bank, this will be a top-level menu option.

Order: The order field will determine its positioning in the current list of menu options at the same level of the menu.

Hint: This is the pop-up tool-tip that will appear when a user hovers the mouse over the menu.

Active: Ensure this checkbox is selected to ensure the Menu Option will display on the system.

Use the Roles selection field to determine for which roles this particular menu option will appear.

Link Type: Select URL (from Arguments:) from the pull-down menu.

In the Arguments field, the URL will be entered that will correspond to the UI page that is intended to be used on which to display the page.  The vast majority of the current existing properties pages on the system are configured to use the default system_properties_ui page, thus you will probably want to populate this field with something similar to the following:

system_properties_ui.do?sysparm_title=<WindowTitle>&sysparm_category=<CategoryNames>

Where <WindowTitle> is the text that you would prefer to appear at the top of the Properties Page window,

and

<CategoryNames> is a comma delineated list of the Category Names which will contain the properties you want to have appear on the rendered properties page.  These system properties will be added to these categories in later steps outlined below.

As an example, the URL for the example Quote Properties page described above might have this Arguments field populated similar to the following:

system_properties_ui.do?sysparm_title=System Quote Properties&sysparm_category=Quote Properties,System Quote Properties

 Example Properties Page Display Module

If you want to have the Properties page open within the main frame, leave the Window Name field blank.  However, if you prefer to have a new window open, provide a name in the Window Name field.  This name should be descriptive of the purpose of the Properties page (i.e. Quote Properties).

Once satisfied with the data in each field, click the Submit button to save the record.


 

 

The new System Properties page should then be accessible from the Main Menu of the Application with which this systems properties page is associated.  It will appear as a sub-menu under that Application Menu with the name specified in the New Application Module as created in the steps above.


Comments

Popular posts from this blog

ServiceNow check for null or nil or empty (or not)

Haven't tested these all recently within global/local scopes, so feel free to have a play! option 1 use an encoded query embedded in the GlideRecord , e.g.  var grProf = new GlideRecord ( 'x_cls_clear_skye_i_profile' ); grProf . addQuery ( 'status=1^ owner=NULL ' ); grProf . query (); even better use the glideRecord  addNotNullQuery or addNullQuery option 2 JSUtil.nil / notNil (this might be the most powerful. See this link ) example: if ( current . operation () == 'insert' && JSUtil . notNil ( current . parent ) && ! current . work_effort . nil ())  option 3 there might be times when you need to get inside the GlideRecord and perform the check there, for example if the code goes down 2 optional routes depending on null / not null can use gs.nil : var grAppr = new GlideRecord ( 'sysapproval_approver' ); var grUser = new GlideRecord ( 'sys_user' ); if ( grUser . get ( 'sys_id' , current . approver )){

Get URL Parameter - server side script (portal or classic UI)

Classic UI : var sURL_editparam = gs . action . getGlideURI (). getMap (). get ( ' sysparm_aparameter ' ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); } Portal : var sURL_editparam = $sp . getParameter ( " sysparm_aparameter " ); if ( sURL_editparam == 'true' ) { gs . addInfoMessage ( 'parameter passed ); }