EventSpark Home

Version 3.11 Upgrade Guide

EventSpark Version 3.11 Upgrade Guide


1. Remove the following Site Guest User Sharing Rules from all of your Sites:

Feature: Security Upgrades

Remove guest user access based on criteria sharing rules for the following Salesforce Standard Objects
  1. Contact

  2. Lead

Remove guest user access based on criteria sharing rules for the following EventSpark Custom Objects
  1. Event/Function

  2. Virtual Platform Connection

  3. Voucher

  4. Event Financial Transaction (If Configured)

Here is an example giving the EventSpark Guest User Read access to all Event/Function records
  • From Setup, enter Sharing Settings in the Quick Find box, and then select Sharing Settings.

  • Scroll to Event/Function in the “Manage sharing settings for” dropdown list:

  • Remove the EventSpark Registration Site Sharing Rule

Scroll and repeat for the following list of Objects in the “Manage sharing settings for” dropdown list:

  1. Contact

  2. Lead

  3. Virtual Platform Connection

  4. Voucher

  5. Event Financial Transaction (If Configured)


2. Event/Function Object

Feature: Add single multi-select field that determines what elements are hidden on the Event Home Page. Two new optiones for hidden elements – hiding the 'Register Someone Else' Button AND hiding the Venue, Date and Time on the Registration Form.

Object Name: Event/Function

Page Layout Names: “Event Series Layout”, “Event/Function Layout”

Section Name: “What To Hide”

Fields: “What to Hide On the Event Home Page”


2.1. Add a new section “What To Hide” to the Page Layouts “Event Series Layout” and “Event/Function Layout” below Microsite Setup and Status and above the section “Microsite - URLs”. The section must be single column.

2.2. Add the field “What to Hide On the Event Home Page” to this new “What To Hide” section.

2.3. What to Hide On Event Home Page Upgrade Script
2.3.1. Go to “Developer Console” under “Setup”, and copy and past the upgrade script in the “Anonymous Execute” window.
NOTE: The user running this script must have the “EventSpark System Administrator” Permission Set assigned to ensure access to the deprecated check box fields. This script will combine the current values of the check boxes that determine what elements are hidden on the Event Home Page into a single multi-select field for your existing Event/Function records.
  • Open Developer Console

  • At the Debug dropdown, select “Execute Anonymous”

  • Copy and Paste the code block below into the window and click “Execute”.

Code Block to be Copy and Pasted into "Anonymous Execute" Window:
String query = 'SELECT Id, evsprk__Hide_On_Event_Home_Page__c,evsprk__Hide_Page_Title__c, ' +

'evsprk__Hide_Page_Title_Dates__c, evsprk__Hide_Page_Title_Event_Name__c, ' +
'evsprk__Hide_Page_Title_Tag_Line__c, evsprk__Hide_Page_Title_Venue__c, ' +
'evsprk__Hide_Speaker_Profile_Images__c, evsprk__Hide_Ticket_Types__c, evsprk__Hide_Venue_Tab__c ' +
'FROM evsprk__Event_Function__c ' +
'LIMIT 10000';

List<evsprk__Event_Function__c> eventsToUpdate = Database.query(query);

for (evsprk__Event_Function__c event : eventsToUpdate) {
String whatToHideOnEvent = '';
if (event.evsprk__Hide_Page_Title__c) {
whatToHideOnEvent += 'Page Title Full;';
}
if (event.evsprk__Hide_Page_Title_Dates__c) {
whatToHideOnEvent += 'Page Title Dates;';
}
if (event.evsprk__Hide_Page_Title_Event_Name__c) {
whatToHideOnEvent += 'Page Title Event Name;';
}
if (event.evsprk__Hide_Page_Title_Tag_Line__c) {
whatToHideOnEvent += 'Page Title Tag Line;';
}
if (event.evsprk__Hide_Page_Title_Venue__c) {
whatToHideOnEvent += 'Page Title Venue;';
}
if (event.evsprk__Hide_Speaker_Profile_Images__c) {
whatToHideOnEvent += 'Speaker Profile Images;';
}
if (event.evsprk__Hide_Ticket_Types__c) {
whatToHideOnEvent += 'Ticket Types;';
}
if (event.evsprk__Hide_Venue_Tab__c) {
whatToHideOnEvent += 'Venue Tab';
}
event.evsprk__Hide_On_Event_Home_Page__c = whatToHideOnEvent;
}

Integer successCount = 0;
Integer failureCount = 0;

if (!eventsToUpdate.isEmpty()) {

Database.SaveResult[] results = Database.update(eventsToUpdate, false);

// Log events that failed to update, with error message
for (Integer i = 0; i < results.size(); i++) {
if (!results[i].isSuccess()) {
String errorMessage = results[i].getErrors()[0].getMessage();
System.debug('Failed to update Event with ID: ' + eventsToUpdate[i].Id + ' Error: ' + errorMessage);
failureCount++;
}
else {
successCount++;
}
}
}

System.debug('Event_Function__c records processesd: ' + eventsToUpdate.size() + ', Successful updates: ' + successCount + ', Failed updates: ' + failureCount);

2.4. Remove the deprecated check box fields from the Page Layouts “Event Series Layout” and “Event/Function Layout”
NOTE: Run the Script in 2.3. before removing these fields from the page layouts.

Page Layouts: “Event Series Layout” and “Event/Function Layout”

Fields to remove:

  • Hide Venue Tab

  • Hide Ticket Types

  • Hide Speaker Profile Images

  • Hide Page Title

  • Hide Page Title Event Name

  • Hide Page Title Venue

  • Hide Page Title Dates

  • Hide Page Title Tag Line