Name
sn_customerservice.CSMCaseSyncBaseImpl
Description
Implements extension point sn_customerservice.CSMCaseSync
Script
var CSMCaseSyncBaseImpl = Class.create();
CSMCaseSyncBaseImpl.prototype = {
initialize: function() {
},
/*
* Function which determines if the Parent Child Sync is enabled for the particular Record.
* Called only if System Property "sn_customerservice.parent_child_ case_sync" is enabled
* Input: Current Case Record
* Output: true /false
*
* Usage Ex:
* Current Glide object / CaseGr can be used to check additional condition
* Eg: if(caseGr.state == 1 || caseGr.state == 10) return true; // Enable sync only if the parent Case is of State 'New' or 'Opened'
*
*/
isCaseSyncEnabled: function(caseGr) {
return true;
},
/*
* Function which determines if the Parent Child Sync is enabled for the particular Record
* Input: Parent Case Record, prevEPEncodedString
* Output: Glide Record Construct with Additional Parameters.
*
* Usage Ex:
* parentCaseGr -> GlideRecord of the Parent case
* prevEPEncodedString -> Previously Calculated Encoded String from other Implementation
*
* Eg:
* Input: parentGr , prevEncodedQuery = active=true;
*
* Implementation can be (if using PrevEncoded Query)
* var newEncodedQuery = '^priority=1';
* return newEncodedQuery + prevEncodedQuery;
*
*
* Implementation can be (if not PrevEncoded Query) //i.e Sync the child cases if their Category matches the parent case
* var newEncodedQuery = '^priority=1^category='+ parentCaseGr.category;
* return newEncodedQuery;
*
*/
childSyncCondition: function(parentCaseGr,prevEncodedQuery){
return CSCaseSyncHelper.DEFAULT_CHILD_CASE_SYNC_FILTER_CONDITION;
},
type: 'CSMCaseSyncBaseImpl'
};
Sys ID
250da8a687022300d6b0a7da0acb0b34