Create Case Type from Interaction Record-Consumer, Type Should be Autopopulate from Interaction

sibasundarsahoo
Tera Contributor

Hi Everyone,

 

1)We have a "Create a Case" button on Interaction form in our CSM Workspace for Customer Service Management.
2)Currently clicking on this button one pop screen is visible on the screen with a choice field with all 3 case types( "Complaints", "Onboarding", "Product Support")
3)Once a case type is selected- "OK" and "Cancel" button is visible.
4)After selecting a case type and clicking on 'Ok' button, I am able to create the case type from the Interaction record.

But my requirement is the specific case type will be created by taking the following details or auto populate from the Interaction record : Type, Consumer and Short Description

I have written this Workspace Client Script in UI Action =

   

function onClick(g_form) {
    var fields = [{
        type: 'choice',
        name: 'case_type_table',
label: getMessage('Please choose a Case Type'),
value: getMessage(' -- None -- '),
choices: [{
displayValue: 'Complaints',
value: 'complaints'
},
{
displayValue: 'Onboarding',
value: 'onboarding'
},
{
displayValue: 'Product Support',
value: 'product support'
},
],
mandatory: true
}];
g_modal.showFields({
title: "Please choose a Case Type",
fields: fields,
size: 'lg'
 }).then(function(fieldValues) {
 var userVal = fieldValues.updatedFields[0].value;
if (userVal == 'complaints') {
 g_aw.openRecord("sn_customerservice_complaints", "-1");
}
if (userVal == 'onboarding') {
g_aw.openRecord("sn_customerservice_onboarding", "-1");
}
if (userVal == 'product support') {
 g_aw.openRecord("sn_customerservice_product_support", "-1");
}
});
}

Can anyone please help me out for this
Thanks in advance!

 

0 REPLIES 0