how to modify the UI action : Create HR Case

chandan31
Tera Contributor

HI All,

 

 

I am not able to modify the script which is available in Create HR Case(ui action )

 

Ui action :Create HR Case

 

table :interaction  

 

chandan31_0-1695698232225.png

Can you help me to modify the script.

 

 

Thanks,

Chandan

3 REPLIES 3

Mayur2109
Kilo Sage
Kilo Sage

Hi @chandan31 ,

 

Please check whether you are trying to edit from different application scope. To edit this record switch to Human Resources: Workspace application.

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,
Mayur Shardul

I can edit the script but i want to add  short description in the code , while add short description it is not working :

Ui action name :Create HR Case

 

written in Workspace Client Script

 

function onClick() {
    if (g_form.getValue('state') != 'closed_complete' && g_form.getValue('state') != 'closed_abandoned') { // HR&O-CR126
        g_form.addInfoMessage('Please close the interaction before creating HR Case');
       
        return false;

       

    }
    var USER = g_form.getValue('opened_for');
    var shortdes=g_form.getValue('short_description');
    var NEW_RECORD = '-1';
    var TABLE_HR_CASE = 'sn_hr_core_case';
    var PARENT_TABLE = g_form.getTableName();
    var PARENT_SYS_ID = g_form.getUniqueValue();
    g_aw.openRecord(TABLE_HR_CASENEW_RECORD, {
        userId: USER,
        subjectPersonIdOnCase: USER,
        parentTable: PARENT_TABLE,
        parentSysId: PARENT_SYS_ID,
       


    });
}

I am trying to add a couple fields too, were you ever able to achieve this ?