You are on page 1of 9

KB0961251

Any object integration in workspace


 403 Views  Last updated : Sep 8, 2023  Customer  Copy Permalink

This article aims at helping you to integrate the any object assessment feature of GRC:
Advanced risk in your workspaces.

Required apps:
1) GRC: Advanced risk
2) GRC: Risk management workspace.

Steps to follow to integrate Any object assessment with your workspace:

Step1:

We have two UIB pages defined in GRC Workspace which will have functionality related
to Any object assessment.
Risk Assessment Homepage
Risk assessment main

So the first step is to create references to those UIB pages in your workspace.

Process to create references in your workspace:

Role required : admin or ui_builder_admin

Create two pages in your workspace


Page 1 with name Risk Assessment Homepage <Placeholder> , route risk-
assessment-homepage and add a required parameter sysId to the page.
Page 2 with name Risk assessment main <Placeholder> , route risk-assessment-
main and add a required parameter sysId to the page.

Replace <Placeholder> with some content like workspace name (If your workspace
name is Audit workspace , you can name page like Risk Assessment Homepage
audit) to differentiate these pages with original pages defined in GRC Workspace.

Once pages are created, navigate to variants of those pages. You can navigate to
variant from Menu in the UIB page. Click on open variant which will navigate to
variant of that page
After navigating to variant there is a field Page Definition. You will notice that page
definition has Risk Assessment Homepage audit Replace that field with original page
definitions Risk Assessment Homepage defined in GRC: Common Workspace
Elements scope. Similarly replace page definition for other page as well. Once you
have replaced page definition it should look like below
After you have successfully referenced to our pages, you can delete the page
definitions Risk Assessment Homepage Audit and Risk assessment main audit
which are no longer required .

To delete page definitions navigate to Now Experience Framework -> Building Blocks
-> UXF Page Definitions , then search for respective page and delete them. This step is
not mandatory , it is just to delete stale page definitions.

Step2:

After successful reference to the pages , now the next action is to create a Declarative action
on the record where you wan to perform Any object assessment.

Following are the steps to create a Declarative action and its associated mappings:
1. Create a declarative action for your table.

a) Navigate to Now Experience Framework -> Actions and Events -> Action bar
declarative actions, Click New.
b) On the form, fill in the fields:
Action label : "Assess Risk"
table : Table on which you are planning to create a UI action in workspace
specify client action: "Create Assessment"
c) Click Submit.

2. Create an event mapping for the declarative action created in step 1.


a) On the Navigation search field, type "sys_ux_addon_event_mapping.list" and click
Enter.
b) Click New.
c) On the form, fill in the fields:
Event Mapping Name: "Any object assessment event"
Source element ID : "ui_action_bar"
Source Declarative action: "Assess Risk". <Select the one created step 1>
Parent Macroponent: "Record".(UX macroponent configuration record from
base agent record page).
Target Event :"RECORD#OPEN_MODAL"
Target Payload Mapping:
{
"type": "MAP_CONTAINER",
"container": {
"route": {
"type": "EVENT_PAYLOAD_BINDING",
"binding": {
"address": [
"route"
]
}
},
"fields": {
"type": "MAP_CONTAINER",
"container": {
"table": {
"type": "EVENT_PAYLOAD_BINDING",
"binding": {
"address": [
"table"
]
}
},
"sysId": {
"type": "EVENT_PAYLOAD_BINDING",
"binding": {
"address": [
"sysId"
]
}
}
}
}
}
}

4. Navigate to Now Experience Framework -> UX form actions and click New and then
enter the details as follows:
• Name: Assess risk
• Action type: Declarative action
• Table: Table on which you want to add the UI action
• Declarative action: “Assess risk”

5. Navigate to Now Experience Framework -> UX Form action layouts. Create new if there
is no entry for your table
• Name: <Table Layout Name >
• Table: Table on which you want to add the UI action

6. Click on new button in UX Form Action Layout Items related list in record created in step
5, then enter the details as follows:
• Name: Assess risk
• Label : Assess risk
• Table: Table on which you want to add the UI action
• Action: “Assess risk”

After successful creation of action on navigating to record there should an action with name
Assess risk. On click of it a modal appears on submit of that modal risk assessment will be
created.
Step 3:

You can configure a related list which will show list of risk assessments performed on that
object.
To configure related list we have to create relation ship , follow this KB Article to
create relationship.
Once relationship is created add this as a related list to the workspace view for
that record.

Navigate to the record in workspace and you will find Risk assessments related list.

Step 4:

Once related list is created on the workspace view, now we have to handle the navigation on
click of Risk assessment record in your workspace. On click of any Risk assessment record
in your workspace it should navigate to our Risk assessment Home page.

Follow below steps to handle navigation:


Create a Route configuration for your workspace if it is not created already . Navigate to
sys_ux_dynamic_route_config.list to create route configuration.
Now create route mapping with following following payload.

{
"route": "risk-assessment-homepage",
"targetRoute": "",
"fields": {
"sysId": "{{sys_id}}"
},
"params": "",
"redirect": true,
"passiveNavigation": "",
"title": "",
"multiInstField": "",
"external": ""
}

See below example that we have created in Risk management workspace.


The world works with ServiceNow.

Did this KB article help you?

 
Attachments

 sys_ux_m2m_action_layout_item_4514577d73772010ec95d11ee2f6a71e.xml

 sys_ux_form_action_b2c3937d73772010ec95d11ee2f6a75d.xml

 sys_ux_form_action_layout_item_f7f3577d73772010ec95d11ee2f6a768.xml

 sys_declarative_action_assignment_79d2973d73772010ec95d11ee2f6a7e0.xml

 Screenshot 2021-08-17 at 11.56.13 AM.png

 Screenshot 2021-08-17 at 1.13.11 PM.png

 sys_ux_addon_event_mapping_6a841f7d73772010ec95d11ee2f6a7bd.xml

 Screenshot 2021-08-17 at 12.14.36 PM.png

 Screenshot 2021-08-17 at 12.46.27 PM.png

You might also like