Auto populate interaction opened for user in form requested for in Service Operation Workspace.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Created an option - 'Maintenance' in the category field and updated the 'Create Request' Action Assignment in a way if the category is 'Maintenance' then if the user clicks on 'Create Request' it should be redirected to a particular form (catalog item) in Service Operation Workspace.
Then the 'Opened for' in interaction form should be populated in the field 'Requested for' on the catalog item form.
It is working till re-direction of the form but facing an issue to populate the 'Opened for' user in 'Requested for' field.
Updated the 'Create Request' Action Assignment with below lines:
params.sysparm_requested_for = openedFor; // Pass the opened_for to the catalog item
params.sysparm_category = category;
And created a catalog client script:
function onLoad() {
var parentTable = g_form.getParameter('sysparm_parent_table');
var category = g_form.getParameter('sysparm_category');
var requestedForParam = g_form.getParameter('sysparm_requested_for');
if (parentTable == 'interaction' && category == 'Maintenance' && requestedForParam) {
g_form.setValue('requested_for', requestedForParam);
}
}
It was not working and there was a JavaScript error.
Tried few other scripts still there was same error.
Note: Option is populated on fulfillment and Service Operation Workspace. The 'Create Request' is available only on Service Operation Workspace and when we click on it the form is opened in Service Operation Workspace. (Attached a reference screenshot)
Kindly let me know if there is any other script or way to achieve this.
Thank you in advance.
0 REPLIES 0
