variables.elementName = getEventRecurrenceCEName();
variables.elementIDfield = "uniqueID";
variables.parentIDfield = "calEventID";
//variables.CCAPIName = getEventRecurrenceCCAPIname();
variables.CCAPIName = getCCAPIName(variables.elementName);
variables.elementViewName = getCEViewName(variables.elementName);
if ( LEN(arguments.uniqueID) )
return application.ptCalendar.ceData.getCEData(variables.elementName, variables.elementIDfield, TRIM(arguments.uniqueID));
else
return application.ptCalendar.ceData.getCEData(variables.elementName);
var ElementIDfield = "calEventID";
return application.ptCalendar.ceData.getCEData(variables.elementName, ElementIDfield, TRIM(arguments.calEventID));
// Check if the user is in the Forum User Settings CE
var dataArray = getRecurrence(uniqueID=arguments.uniqueID);
var dataStruct = StructNew();
var retStruct = StructNew();
var saveStatus = StructNew();
// Check if no record exists
if ( NOT ArrayLen(dataArray) ) {
// Create the a new record
dataStruct = arguments.recurrenceData;
//dataStruct.uniqueID = createUUID(); // new UUID for this "new" data was already created
//dataStruct.uniqueID = arguments.uniqueID;
//dataStruct.calEventID = arguments.calEventID;
// Set the status
saveStatus['type'] = 'created';
}
else {
// Update the Record
// Set the existing values
dataStruct = dataArray[1].values;
// Override with the new values
for ( key in arguments.recurrenceData ) {
dataStruct[key] = arguments.recurrenceData[key];
}
// Set the Page ID from the existing record
dataStruct.dataPageID = dataArray[1].PageID;
//dataStruct.uniqueID = arguments.uniqueID;
//dataStruct.calEventID = arguments.calEventID;
// Set the status
saveStatus['type'] = 'updated';
}
// Create the record
retStruct = recurrenceCCAPI(dataStruct);
if ( retStruct['CONTENTUPDATED'] IS true )
saveStatus['status'] = 'success';
else
saveStatus['status'] = 'fail';
return saveStatus;
var formID = getEventRecurrenceFormID();
var elementFields = application.ptCalendar.ceData.getElementFieldsByFormID(formID);
var currPageID = 0;
var i = 1;
var j = 1;
var retStatusStruct = application.ptCalendar.csContent.populateContent(variables.CCAPIName, arguments.dataValues);
/* retStatusStruct RETURNS: CONTENTUPDATED : true/false & CONTENTUPDATERESPONSE: Success:1 */
return retStatusStruct;