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?  

5 REPLIES 5

aj2171
Mega Guru

I'm experiencing the same issue. Commenting to follow.

Amrita Kanungo2
Tera Contributor

Hi @ErinF : Did you find the best way to do it? I have got a similar requirement.

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);
    }
}






Hi,

Thank you for your response. Even I was thinking of doing it similar way but wasnt sure how to implement it.

I have some questions on the code can you please clarify - 

 

function bulkTransferCase() {
    try {
        var arr_sysIds = g_list.getChecked().split(','); --- what is getChecked() function doing?

        var dialogClass = GlideModal ? GlideModal : GlideDialogWindow;
        var dialog = new dialogClass('sn_hr_core_Transfer Case v2'); // Is sn_hr_core_Transfer Case v2 being defined or updated somewhere else as well?
        dialog.setTitle(getMessage('Transfer Case'));
        dialog.setPreference('sysparm_sys_id', arr_sysIds[0]);
        dialog.setPreference('sysparm_table_name''sn_hr_core_case'); // should we put the new table name of the new COE here?
        dialog.setPreference('sysparm_subject_person'''); //Why are we setting subject person as blank?
        dialog.setPreference('sysparm_arr_sys_ids'JSON.stringify(arr_sysIds)); // NEW
        dialog.render();
    } catch(err) {
        console.log('Bulk Transfer Case error | ' + err);
    }
}