You are viewing an old version of this page. View the current version.
When working with the Multi Resource Calendar, you might want to link to a specific calendar directly. This is possible using URL parameters with the Multi Resource Calendar.
Multi Resource Calendar page parameters
While the Start parameter does specify where the calendar starts, if the view being linked to is 'Week' or 'Month', the page being displayed will start at the start of the Week or Month that Start is contained in.
|calendar||Yes||The name of the Calendar record where the configuration should be loaded from.|
|recordId||No||One or more ID's of the Resource, Staff or Group records you want to display the calendar for. These resources should exist and be non Virtual and of the same type as the calendar. If the id of a parent resource is provided, all its children will also be loaded. This parameter overrides any user defined filters.|
The unique name of a View that is attached to the calendar of the type of Resource being displayed. if the view could not be found, the default View wil be selected
|rsv||No||The id of a reservation. If provided the calendar will focus on this reservation and highlight it for 5 seconds.|
|lightning||No||Indicate if Booker25 is running in Lightning Experience context or not. Pass true if in Lightning Experience and false otherwise. This is required, because when Booker25 is embedded it has no way of detecting this context by itself. If not passed, Booker25 wil assume Classic context, and links to Visualforce pages will not open correctly for users in Lighting Experience.|
|prototypeReservation||No||A JSON object that represents a reservation. This reservation will be used as a template when new reservations are created on the calendar. This allows you to pre-populate fields. This can be useful for automatically linking new reservations to the record on which you are embedding the calendar.|
|preserveIdOrder||No||If you include preserveIdOrder=true, the order of the ids passed in the recordId parameter will be maintained on the calendar. The default value is false, which means that the calendar applies its own ordering.|
Multi Resource calendar page structure and naming
The Multi Resource Calendar consists of two separate pages:
|B25__MultiResourceCalendarWrapper||The main page for the Multi Resource Calendar. This page includes the Salesforce header and looks like a Salesforce page. Use this in your URL when linking to the calendar in both Salesforce Classic and Lightning.|
|B25__MultiResourceCalendar||The page wrapped by B25__MultiResourceCalendarWrapper. This page contains all the actual logic for the Multi Resource Calendar. Use this page when embedding the calendar in a detail page, or somewhere where the Salesforce header is already on the page.|
Older versions of booker25 used different pages and three of these pages are still used for the resource staff and group tabs.
|classic_calendar||Used for the resource calendar tab loads the calendar with the configuration of the calendar Named Resources|
|ClassicGroupCalendar||Used for the group calendar tab loads the calendar with the configuration of the calendar Named Groups|
|ClassicStaffCalendar||Used for the staff calendar tab loads the calendar with the configuration of the calendar Named Staff|
|lightning_calendar||Calendar page without the salesforce header loads the calendar with the configuration of the calendar Named Resources|
|GroupCalendar||Calendar page without the salesforce header loads the calendar with the configuration of the calendar Named Groups|
|StaffCalendar||Calendar page without the salesforce header loads the calendar with the configuration of the calendar Named Staff|
Linking to a specific calendar
When linking to the multi resource calendar from Lightning Experience, loading the page might result in the page opening without the Lightning header. When this happens append /one/one.app#/alohaRedirect to the front of the URL.
You can link to a specific calendar by specifying the View and Start date in the URL. For example, to create a link to the calendar from a Reservation detail page that wil show the Multi Resource Calendar on the week where the reservation starts proceed as follows:
- Go to the View record that specifies the week view on the Multi Resource Calendar and copy the unique identifier, for example: day
- Go to Salesforce Setup and create a new button or link on the Reservation object
- The URL to be used in this example would be
- Save the new link and add it to the Reservation Page Layout
- The button / link should open the calendar on the week that the reservation starts, for the resource the reservation was made in.
Specifying multiple recordIds
You can specify multiple record ids to display on the calendar, to do this separate the record ids using commas for example:
Embedding the Multi Resource Calendar in a VisualForce page
It is possible to embed the Multi Resource Calendar into your own VisualForce pages and in the detail pages in the standard Salesforce ui.
In this example, we will show how to make a page that can be embedded into a Contact detail page. This Contact record has a lookup to the Staff record that represents this Contact, named Staff__c. This page will show the Contact's calendar for the current week.
Note how we used the B25__MultiResourceCalendar instead of B25__MultiResourceCalendarWrapper, to avoid the standard Salesforce header being shown within the Contact detail page. Also passing TODAY to the start parameter is optional, since when no parameter is passed it defaults to the current date.
Specifying a prototype reservation
When creating a Reservation on an embedded calendar, you may pre-populate fields on the Reservation with information from the record on which the calendar has been embedded. Booker25 does this by creating a "Prototype Reservation".
There are multiple ways to build the JSON required for the Prototype Reservation:
- Build the JSON in VisualForce.
- Build the JSON in a controller
Build the JSON in VisualForce
Using the code snippet below, and on a VisualForce page that references the Contact Standard Controller, you can create a JSON object in VisualForce using the fields on the Contact object:
Build the JSON in a controller
For a more complex Prototype Reservation, you can define a Controller Extension and then output the Reservation JSON on the page:
Output on the VisualForce page that references the Opportunity Controller Extension:
Bookmarking calendars and linking calendars
This functionality only works in Salesforce Classic due to Salesforce limitations.
The Multi Resource Calendar can be bookmarked and linked, as the app keeps the URL up to date with the current the View and Start parameters. This means that if you copy the current URL and distribute it to other users, they wil get the same calendar you are viewing (if they are logged in to Salesforce and their Permissions allow for this).
- No labels