Transfer Case Button

Himanshu Kumar
Tera Contributor

Hi ,

 

How to create Transfer Case button on  Finance, Procurement and Supply Chain agent workspace.

transfer option will be available for both existing and new cases. and allow user to department of transfer case

1 REPLY 1

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Himanshu Kumar  Create an UI Action, make a Client checkbox true on UI Action and in Workspace Client Script use below code. Refer this article https://www.servicenow.com/community/next-experience-articles/how-to-use-ui-actions-in-workspaces/ta... 

var fields = [
        {
            type: 'reference',
            name: 'assignment_group',
            label: getMessage('Add an Assignment Group'),
            mandatory: true,
            reference: 'sys_user',
            referringTable: 'incident',
            referringRecordId: g_form.getUniqueValue(),
        },
{
        type: 'textarea',
        name: 'work_notes',
        label: getMessage('Reason'),
        mandatory: true
    }               
    ];
    g_modal.showFields({
        title: "Enter Transfer Case Reason",
        fields: fields,
        size: 'lg'
    }).then(function(fieldValues) {
        g_form.setValue('assignment_group', fieldValues.updatedFields[0].value);
        g_form.setValue('work_notes', fieldValues.updatedFields[1].value);
        g_form.save();
    });

Sid_Takali_0-1726730196680.png