Name

sn_customerservice.CSCaseSyncHelper

Description

No description available

Script

var CSCaseSyncHelper = Class.create();
CSCaseSyncHelper.CASE_SYNC_EXTENSION_POINT   = 'CSMCaseSync';
CSCaseSyncHelper.DEFAULT_CHILD_CASE_SYNC_FILTER_CONDITION = 'active=true^stateNOT IN6,3,7';


CSCaseSyncHelper.prototype = {
  initialize: function() {
  },
  
  /*
  * Function which determines if the Parent Child Sync is enabled for the particular Record. 
  * This is used in addition to the System Property "sn_customerservice.parent_child_ case_sync" in BR 
  */
  
  isCaseSyncEnabled : function(caseGr){

  	var ep = new GlideScriptedExtensionPoint().getExtensions(CSCaseSyncHelper.CASE_SYNC_EXTENSION_POINT);
  	var result = true;
  	// If there is any other new extension instance other than the OOB one
  	// The extension instance with higher order number would be considered
  	for(var i = 0; i < ep.length; i ++){
  		var point = ep[i];
  		result = point.isCaseSyncEnabled(caseGr);
  	}
  	return result;
  },

  /*
  * Function which determines the child case filter conditions which are eligible for Sync from Parent Record
  */
  childSyncCondition : function(parentGr){

  	var ep = new GlideScriptedExtensionPoint().getExtensions(CSCaseSyncHelper.CASE_SYNC_EXTENSION_POINT);
  	var result = '';
  	// If there is any other new extension instance other than the OOB one
  	// The extension instance with higher order number would be considered

  	for(var i = 0; i < ep.length; i ++){
  		var point = ep[i];
  		result = point.childSyncCondition(parentGr,result);
  	}
  	return result;
  },

  type: 'CSCaseSyncHelper'
};

Sys ID

a6bee0e687022300d6b0a7da0acb0b27

Offical Documentation

Official Docs: