Bulk HR Case Transfer to New COE

ErinF
Tera Expert

Hello HRSD Community! 

 

I have a very long list of HR Cases that need to be transferred to another COE table (i.e. sn_hr_core_case to sn_hr_core_case_benefits). What is the best way to do this without having to manually transfer each case individually? 

 

My current thought process is to export the case data, update the appropriate fields, and upload via transform map into the new table. Then bulk cancel (via another transform map) the cases on the current table. However, this feels like a lengthy and error-prone solution. 

 

I tried to load a transform map into the HR Case table, updating the Task Type to the new COE, but it does not update the Table, leading to a mismatch of table/HR Service. 

 

Does anyone have any ideas or solutions that may help?  

7 REPLIES 7

Not applicable

What this UI Action will do is pull the OOB Transfer Case Modal (I created my own version, that's why I called it sn_hr_core_Transfer Case v2)

aj2171_0-1749043566150.png


Is sn_hr_core_Transfer Case v2 being defined or updated somewhere else as well?
sn_hr_core_transfer case is updated through UI Builder. 

what is getChecked() function doing?

The UI action is triggered from the HR Case list view. It checks for records selected


Why are we setting subject person as blank?
you want each case to be transferred with its own information; we are not prepopulating information in the UI action or allowing selection of anything other than the HR service. Everything else uses OOB functionality.

alexalejandro
ServiceNow Employee

Hi there! Reposting this as my old account may get deactivated and posts lost.

What this UI Action will do is pull the OOB Transfer Case Modal (I created my own version, that's why I called it sn_hr_core_Transfer Case v2)

alexalejandro_0-1778505864381.png

 




Is sn_hr_core_Transfer Case v2 being defined or updated somewhere else as well?
sn_hr_core_transfer case is updated through UI Builder. 

what is getChecked() function doing?

The UI action is triggered from the HR Case list view. It checks for records selected


Why are we setting subject person as blank?
you want each case to be transferred with its own information; we are not prepopulating information in the UI action or allowing selection of anything other than the HR service. Everything else uses OOB functionality.

If this helped, please mark it as helpful so others can find it more easily 👍

alexalejandro
ServiceNow Employee

Hello There! I figured out another way to complete this. I created a UI action on the table (sn_hr_core_case) by cloning the the OOB transfer case UI action and adding logic for multiple records.

Note: This allows you to bulk transfer between COE's to a single HR Service type

function bulkTransferCase() {
    try {
        var arr_sysIds = g_list.getChecked().split(',');

        var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
        var dialog = new dialogClass('sn_hr_core_Transfer Case v2');
        dialog.setTitle(getMessage('Transfer Case'));
        dialog.setPreference('sysparm_sys_id', arr_sysIds[0]);
        dialog.setPreference('sysparm_table_name''sn_hr_core_case');
        dialog.setPreference('sysparm_subject_person''');
        dialog.setPreference('sysparm_arr_sys_ids'JSON.stringify(arr_sysIds)); // NEW
        dialog.render();
    } catch(err) {
        console.log('Bulk Transfer Case error | ' + err);
    }
}
 
If this helped, please mark it as helpful so others can find it more easily 👍