Upgrade from Booker25 v1.x / v2.x / v3.x / v4.x to the latest release

Always first perform the upgrade path in a Sandbox that matches the configuration of your Production org. Before upgrading in your Production org, make sure to adequately test any functionality that is important to you in the upgraded Sandbox.

Some fields are deprecated and replaced during the upgrade path mentioned below. If any of your custom work depends on those fields, make sure to deal with this accordingly by pointing to the new fields.

At some steps in this upgrade process, accessing the calendar will be impossible as it will throw an error. This is normal and will be resolved by following the upgrade path until the end. Make sure to perform the upgrade when using the calendar is not required by you or your users and always perform the upgrade in a Sandbox matching your Production org first, to make sure everything goes as expected!

During the upgrade process, you may run into errors such as [Reservation_Display__c: Unmanaged custom object tab already exists, package upgrade cannot create another tab: Reservation_Display__c: Unmanaged custom object tab already exists, package upgrade cannot create another tab]. This means that Booker25 is introducing a tab for an object that you have already created a tab for. Resolving this is simple, as you just need to remove your tab in SetupTabs and retry that specific upgrade

Check your Booker25 version

  1. Make sure Setup > Deliverability > Access level is set 'All email'


  2. Check which Booker25 version you are running under Setup Installed Packages
  3. Start from the appropriate section below

I am on version 1.x

  1. Install Booker25 v1.178 in a Sandbox or Install Booker25 v1.178 in Production
  2. Proceed to the next section

I am on version 2.x

Install Booker25 v2.9

Skip this step if you are running a higher version than v2.9

  1. Install Booker25 v2.9 in a Sandbox or Install Booker25 v2.9 in Production
  2. Check that on all your Resources, the B25__Resource_Type__c field is filled:
    1. Open the Developer Console
    2. Go to the Query Editor
    3. Run the following query and make sure it returns 0 results: 

      SELECT COUNT() from B25__Resource__c WHERE B25__Resource_Type__c = null
    4. Should you get a result of 1 or more, open an Execute Anonymous window and run a script to copy the value of B25__Type__c to B25__Resource_Type__c for all your Resources. Else proceed to the next section

      List<B25__Resource__c> resourcesToUpdate = [SELECT B25__Type__c FROM B25__Resource__c];
      
      for (B25__Resource__c  resource : resourcesToUpdate ) {
          resource.B25__Resource_Type__c = resource.B25__Type__c;
      }
      
      Database.update(resourcesToUpdate);
    5. When you are sure all your Resources have the B25__Resource_Type__c field filled, you may delete the B25__Type__c field from your org as it is now deprecated. Deleting the field will also delete any data in it, so make sure you are confident that all occurrences of the new field are set!
    6. Proceed to the next section

Install Booker25 v2.78.1

  1. Install Booker25 v2.78.1 in a Sandbox or Install Booker25 v2.78.1 in Production
  2. Proceed to the next section

I am on version 3.x

Install Booker25 v3.47

Proceed to the next section if you are running a higher version than v3.47

  1. Install Booker25 v3.47 in a Sandbox or Install Booker25 v3.47 in Production
  2. Check that on all your Availability records, the B25__Resource_Type__c field is filled:
  3.  Open the Developer Console
    1. Go to the Query Editor
    2. Run the following query and make sure it returns 0 results: 

      SELECT COUNT() from B25__Availability__c WHERE B25__Resource2__c = null
    3. Should you get a result of 1 or more, continue to the following step. Else, if you are sure all your Availabilities have the B25__Resource2__c field filled, you may delete the B25__Resource__c field on the B25__Availability__c object from your org, as it is now deprecated. Deleting the field will also delete any data in it, so make sure you are confident that all occurrences of the new field are set!. Then proceed to the next section Configure 'Reservation Field

    4. Create a field Resource_Formula__c on the Availability object of type Text
    5. Let this formula point to the B25__Resource__c field on the Availability object
    6. Open the Developer Console

    7. Open an Execute Anonymous window and run a script to copy the value of Resource_Formula__c to B25__Resource2__c for all your Availability records:

      List<B25__Availability__c > availabilitiesToUpdate = [SELECT ID, Resource_Formula__c FROM B25__Availability__c ];
      
      for (B25__Availability__c  availability : availabilitiesToUpdate ) {
          availability.B25__Resource2__c = availability.Resource_Formula__c ;
      }
      
      Database.update(availabilitiesToUpdate);
    8. When you are sure all your Availabilities have the B25__Resource2__c field filled, you may delete the B25__Resource__c and Resource_Formula__c fields from your org as they are now deprecated. Deleting the field will also delete any data in it, so make sure you are confident that all occurrences of the new field are set!

Configure ‘Reservation Field’

  1. Go to Setup > Object Manager > Calendar

  2. Go to the Fields & Relationships section

  3. Click on Reservation Field (B25__Reservation_Field__c)

  4. Scroll down to the Values section

  5. Click Edit next to each value, and prefix both the Label as the API Name with B25__ (B25 followed by two underscores)

  6. The Values section should now look as in the following image


Set-up Reservation Titles, Reservation Hovers & Reservation Types

Run the following code snippet in Execute Anonymous to set-up the Reservation Titles, Reservation Hovers & Reservation Types

List<B25__Reservation_Title__c> titles = new List<B25__Reservation_Title__c>();
		List<B25__Calendar__c> calendars = [SELECT B25__Reservation_Title_Field__c FROM B25__Calendar__c];
		for (B25__Calendar__c calendar : calendars) {
			titles.add(new B25__Reservation_Title__c(B25__Calendar__c = calendar.Id, Name = calendar.B25__Reservation_Title_Field__c, B25__Font_Size__c = 12, B25__Bold__c = false, B25__Order__c = 1));
		}
		Database.insert(titles, false);

List<SObject> displays = Database.query('SELECT Id FROM B25__Reservation_Display__c');
		List<B25__Hover_Field__c> hoverFields = new List<B25__Hover_Field__c>();
		for (SObject display : displays) {
			List<String> fieldsToDisplay = new List<String>{'B25__Title__c'};
			for (Integer i = 0; i < fieldsToDisplay.size(); i++) {
				hoverFields.add(new B25__Hover_Field__c(Name = fieldsToDisplay[i], B25__Reservation_Display__c = display.Id, B25__Order__c = i));
			}
		}
		Database.insert(hoverFields, false);

Integer numReservationTypes = [SELECT count() FROM B25__Reservation_Type__c];
		if (numReservationTypes > 0) {
			// There is already a Reservation Type in this Org, don't create any more.
			return;
		}
		B25__Reservation_Type__c defaultReservationType = new B25__Reservation_Type__c(
			Name = 'Reservation',
			B25__Field_Set__c = 'B25__Custom_Fields'
		);
		Database.insert(defaultReservationType);

Proceed to the next section

I am on version 4.x

Install Booker25 v4.3.2

Skip this step if you are running a higher version than v4.3.2

  1. Install Booker25 v4.3.2 in a Sandbox or Install Booker25 v4.3.2 in Production
  2. Proceed to the next section

Install Booker25 v4.21

Skip this step if you are running a higher version than v4.21

  1. Install Booker25 v4.21 in a Sandbox or Install Booker25 v4.21 in Production
  2. Go Setup > Object Manager > Calendar > Fields & Relationships
  3. Delete the Reservation Field field
  4. Proceed to the next section


Install the latest version

  1. Install the latest version using the link shared here: Install the latest version
  2. If you are getting an error specifying that you can not upgrade, try to fix the Materialised Path on your Resources and try again

Release notes

You can find the latest release notes here

Related articles

On this page