var photoFormID = application.ptPhotoGallery.getPhotoFormID();
var APIPostToNewWindow = false;
var rtnHTML = "";
var formResultHTML = "";
// Find out if the CE contains an RTE field
var photoData = "";
// Old default value used in older versions of the app ( Less Than v2.0)
// Leave in if the photoID field has not been updated to the default value {createUUID()}.
request.params.photoUID = createUUID();
application.ptPhotoGallery.scripts.loadJquery();
application.ptPhotoGallery.scripts.loadADFLightbox();
Saving Photo...
deleteArgs = StructNew();
deleteArgs.categoryID = itemData.values.category;
deleteArgs.inFile = itemData.values.photo;
if ( StructKeyExists(itemData.values, "imgGalleryPageID") )
deleteArgs.imgGalPageID = itemData.values.imgGalleryPageID;
// Delete result
result = application.ptPhotoGallery.photoService.deletePhoto(deleteArgs);
// If delete success, then delete the CE record data
if (result)
result = application.ptPhotoGallery.cedata.deleteCE(arguments.dataPageId);
// Dialog Info
CD_DialogName = request.params.title;
CD_Title=CD_DialogName;
CD_IncludeTableTop=1;
CD_CheckLock=0;
CD_CheckLogin=1;
CD_CheckPageAlive=0;
//CD_OnLoad="";