Name
sn_anon_rc.ARCProducerBase
Description
Base class of methods used for Anonymous Reporting center record producers. Edit script include ARCProducer to override specific methods or add custom functionality.
Script
var ARCProducerBase = Class.create();
ARCProducerBase.prototype = {
initialize: function() {
},
/**
* Create an Anonomous ER case from a record producer. Called from a record producer script like:
* new ARCProducerBase().createCaseFromProducer(current, producer, cat_item.sys_id);
* @param current GlideRecord [sn_hr_er_case] The ER case
* @param producer Object Contains information from the record producer
* @param recordProducerId Id of the sc_cat_item_producer record
*/
createCaseFromProducer: function (current, producer, recordProducerId){
if (gs.getUserName() == ARCConstants.GUEST_USER_NAME) {
current.external_opened_for = true;
current.opened_by = ARCConstants.ANONYMOUS_REPORT_CENTER_USER;
current.opened_for = ARCConstants.ANONYMOUS_REPORT_CENTER_USER;
current.hr_profile = ARCConstants.ANONYMOUS_REPORT_CENTER_USER_PROFILE;
}
new sn_hr_core.hr_ServicesUtil(current).createCaseFromProducer(producer, recordProducerId);
current.short_description = current.getDisplayValue('hr_service');
},
type: 'ARCProducerBase'
};
Sys ID
a10305c5c7023010eadc357098c26060