UI Builder
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ05-02-2025 03:59 AM
I have created the contact button in the service operation workspace Requested item table Record Information section.
If I click that button, I am able to see the requester for details. It already exists in the incident table. So, I have used the UI builder and created that contact button and I have added the event to the UXF Macroponent Viewport Load Requested script, but the Requester info is not showing. Can you please help with this scenario?
This is the script I am using.
function evaluateEvent({api, event}) {
var subHeadingList = [];
if (api.data.record_information.output && api.data.record_information.output.sourceInfo) {
const requesterInfo = api.data.record_information.output.sourceInfo.requesterInfo.requester;
if (requesterInfo.title)
subHeadingList.push(requesterInfo.title);
if (requesterInfo.department)
subHeadingList.push(requesterInfo.department);
return {
viewportElementId: "viewport_glu", // Make sure this matches the actual viewport component ID
route: "caller-contact", // Standard route for the contact panel
fields: {
"table": api.context.props.recordTable,
"recordSysId": api.context.props.recordSysId,
"userSysId": requesterInfo.sysId
},
params: {
"subTitle": subHeadingList.join(' ยท '),
"parent": "record-info-sc-req-item" // Optional custom identifier
}
};
}
return {};
}
0 REPLIES 0