// Validate the sync app and mapping cache variables are configured
if ( StructKeyExists(application, "ptSync")
AND StructKeyExists(application.ptSync, "cache")
AND StructKeyExists(application.ptSync.cache, "mapSrcFormIDList")
AND ListLen(application.ptSync.cache.mapSrcFormIDList) ){
// Validate the Form ID exists for the Sync Mapping
if ( ListFind(application.ptSync.cache.mapSrcFormIDList, request.params.formid) ) {
// Check the run time sync is enabled
if ( application.ptSync.appConfig.runTimeSync ){
// Delete the record from the destination site
application.ptSync.syncController.processDeleteSync(srcFormID=request.params.formID, srcDataPageID=request.params.pageID);
}
else {
// Schedule the SYNC for delete
application.ptSync.syncController.scheduleDeleteSyncGlobalCE(srcFormID=request.params.formID, srcDataPageID=request.params.pageID);
}
}
}