Reference Qualifier in UI Action reference field

Jaanvi11
Tera Contributor

Hi all,

 

I wanted to check whether reference_qual works in a reference field on a modal pop up in custom workspace? 

Below is the script:

 
function onClick(g_form) {
    var userSysId = '5d5d20951b836114a50dfc49cc4bcba9';
    var fields = [{
        type: 'reference',
        name: 'assigned_to', //Give your custom reference field
        label: getMessage('Reassign To'), //Give as per your requirement
        mandatory: true,
        reference: 'sys_user', //Give which table your custom field refers to
        reference_qual:'sys_id=  ' + userSysId,
        referringTable: 'x_iem_tqa_work_order_task', //Give your custom table
        referringRecordId: g_form.getUniqueValue()
    }];

    g_modal.showFields({
        title: "Enter your details",
        fields: fields,
        size: 'lg'
    }).then(function(fieldValues) {
        g_form.setValue('assigned_to', fieldValues.updatedFields[2].value);
        g_form.save();
    });
}​

This sys id is of a user which was available in the 250 records of the dropdown, but when I used the reference qualifier and inserted the sys id, the dropdown kept loading.

0 REPLIES 0