- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 12:35 AM
Hi, I would like to modify the OOTB ESG workspace for "My metric data task" page.
I have created a customer field for metric definition table, I want to replace the OOTB description field to my customer field on "My metric data task" UI page. How can I configure it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 12:17 AM
OK, I found it by myself.
It is in the script include"MetricDataTableUtilsBase" function "_getMetricDataTasksPerGroup" line 324.
I can change the filed name and overwrite the base script include.
var dataTaskRow = {
"metric_definition": {
sysId: metricDefSysId,
name: metricDefintionGr.getValue("name"),
displayValue: metricDefintionGr.getDisplayValue("name"),
description: metricDefintionGr.getValue("description"),
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 02:17 AM
Hi @ESL ,
Hope you are doing great.
To replace the Out-of-the-Box (OOTB) description field with your custom field on the "My metric data task" UI page in the ESG workspace, you can follow these steps:
Go to the Application Navigator and search for "Service Portal" or navigate to "Service Portal > Portals."
Open the ESG workspace for editing. This can be done by finding the ESG workspace record and clicking on it.
Once inside the ESG workspace, locate the "My metric data task" page. This page is responsible for displaying the tasks related to metric data.
Edit the "My metric data task" page. Look for the specific section where the OOTB description field is being displayed.
Replace the OOTB description field with your custom field by modifying the HTML code of the page. You can use the Service Portal designer to make the necessary changes. Below is reference script for HTML code:
<sp-widget widget="record-display" class="my-metric-task">
<sp-header label="Metric Definition">
<sp-variable form-field="customer_field"></sp-variable> <!-- Your custom field -->
</sp-header>
</sp-widget>
- Save it.
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2023 05:32 PM
Hi @Riya Verma
Thanks for your comment.
I have tried to find the UI page from "Service Portal > Portals" module, but I cannot find the ESG Workspace definition there. Only ESG reporting shows in the list.
I am also try to find it from UI page module and workspace configuration page, I am not able to find it.
Is it possible to share the LINK of the "My metric data task" UI page to me? I will replace the instance name to my instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 12:17 AM
OK, I found it by myself.
It is in the script include"MetricDataTableUtilsBase" function "_getMetricDataTasksPerGroup" line 324.
I can change the filed name and overwrite the base script include.
var dataTaskRow = {
"metric_definition": {
sysId: metricDefSysId,
name: metricDefintionGr.getValue("name"),
displayValue: metricDefintionGr.getDisplayValue("name"),
description: metricDefintionGr.getValue("description"),
},