Name
sn_hr_er.er_RefQualsBase
Description
Base class of methods used for Employee Relations reference qualifiers. Edit script include er_RefQuals to override specific methods or add custom functionality.
Script
var er_RefQualsBase = Class.create();
er_RefQualsBase.prototype = {
initialize: function() {
},
type: 'er_RefQualsBase'
};
/* Limit interviewee field to Involved Parties on the same case.
* Field interviewee [current is a sn_hr_er_interview record]
*/
er_RefQualsBase.interviewee = function() {
if (current.getValue('hr_case') == "")
return "sys_id=null"; // make them select the case first
return 'hr_case=' + current.getValue('hr_case');
};
/* Limit involved party field to Involved Parties on the same case.
* Field involved_party [current is a sn_hr_er_corrective_action record]
*/
er_RefQualsBase.involvedParty = function() {
if (current.getValue('hr_case') == "")
return "sys_id=null"; // make them select the case first
return 'hr_case=' + current.getValue('hr_case');
};
/* Limit involved party field (i.e, subject of allegation) to Involved Parties on the same case with type respondent.
* Field involved_party [current is a sn_hr_er_m2m_allegation_party record]
*/
er_RefQualsBase.subjects = function() {
var caseId = '';
if (current.allegation && current.allegation.hr_case)
caseId = current.allegation.hr_case;
else
caseId = gs.getSession().getClientData("sn_er.ERCaseSysId");
if (!caseId)
return "sys_id=null"; // make them select the case first
return 'hr_case=' + caseId + '^type=respondent';
};
/* Limit allegation field if there already is an involved party selected to be just allegations on the case.
* Tis is needed for HR agent workspace as it can't use the custom Edit... button and slushbucket.
* Field allegation [current is a sn_hr_er_m2m_allegation_party record]
*/
er_RefQualsBase.allegation = function() {
var caseId = '';
if (current.involved_party && current.involved_party.hr_case)
caseId = current.involved_party.hr_case;
else
caseId = gs.getSession().getClientData("sn_er.ERCaseSysId");
if (!caseId)
return '';
return 'hr_case=' + caseId;
};
Sys ID
e0125e2fff270010a9e7faf9453bf1ec