Hi Team,  In service operation Workspace under interaction record we have UI actions which is Create

Not applicable

Hi Team,  In service operation Workspace under interaction record we have UI actions which is Create Request , Create Incident, whenever click Create Request it will show  interaction record  agent name need to Auto populate  in the catalog  form Requested for field level?

AA6_0-1764154682665.png

 

8 REPLIES 8

@Ankur Bawiskar 

didn't get you, could you explain further

@soumyadeep10 

are you suggesting to create a new UI action for this?

OR

are you suggesting to make changes to the OOTB UI action? if yes then which one? share screenshots

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Community Alums , 

Did my answer work in your case. If it did, please do accept my solution and mark it helpful.

Ankur Bawiskar
Tera Patron

@Community Alums 

I shared a blog for this, check that and enhance

Invoke record producer within Configurable workspace, send parameter & fetch the value 

Sharing working solution here -> I passed the assigned_to from Interaction form and showed that in alert

-> update the OOTB List Action as this

https://instanceName.service-now.com/nav_to.do?uri=sys_declarative_action_assignment.do?sys_id=7dfcdba7b57a4210f87774aeaa46dcde%26sysparm_view=form_action

function onClick() {
    var result = g_form.submit('sysverb_ws_save');
    if (!result) {
        //failed form submission
        return;
    }

    result.then(function() {
        var params = {};
        params.sysparm_parent_table = "interaction";
		params.sysparm_assignedTo = g_form.getValue('assigned_to');
        params.sysparm_parent_sys_id = g_form.getUniqueValue();
        g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
    });
}

-> create onLoad catalog client script on your catalog item to grab and set the value in whatever variable you want

function onLoad() {

    var url = top.location.href;
    var urlParameterValue = '';
    if (url.indexOf('now/sow') > -1) { // check if it's configurable workspace
        var url_cwf = decodeURIComponent(url);
        var workspaceParams = url_cwf.split('extra-params/')[1]; //Split off the url on Extra params
        var allParams = workspaceParams.split('/'); //The params are split on slashes '/'   
        //Search for the parameter requested
        for (var i = 0; i < allParams.length; i++) {
            if (allParams[i] == 'sysparm_assignedTo') { // give here the name of parameter to fetch
                urlParameterValue = allParams[i + 1];
            }
        }
        alert(urlParameterValue);
    }
}

AnkurBawiskar_0-1764167781017.png

 

Output:

pass form value from interaction create request to catalog item within workspace.gif

I believe I have shared a working solution and you can enhance it further based on your requirement and developer skills

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader