Name
global.CSMBusinessRuleUtils
Description
A collection of sys_class_name s that are whitelisted, for execution of business rules and a collection of Business Rules table_names where the execution is blacklisted
Script
var CSMBusinessRuleUtils = Class.create();
CSMBusinessRuleUtils.prototype = {
initialize: function() {
},
sysClassNameWhiteList: [
'sn_customerservice_case',
'sn_onboarding_case',
'sn_complaint_case'
],
namePresent: function(name) {
return name === this.toString();
},
validate: function(sysClassName) {
return this.sysClassNameWhiteList.some(this.namePresent, sysClassName)
},
//List of Business Rules: [table_names] for which the BR execution is to be excluded
//Sync child case fields upon parent chng
_d26abb053b930300b5c42479b3efc4c0 : ['csm_order_case', 'sn_complaint_case', 'sn_onboarding_case'],
//Check if the BR execution is excluded for this Case Type
isExcluded : function(sys_id, class_name) {
var attrib_name = "_" + sys_id;
if(this[attrib_name]) {
return (this[attrib_name].indexOf('' + class_name) == -1);
}
return true;
},
type: 'CSMBusinessRuleUtils'
};
Sys ID
b0aad4e3c7a28010ba92eb861dc260c7