...
Property | Expected Value | Description |
---|---|---|
calendarId* | The Name of a Calendar record. | This sets the configuration based on the linked Calendar record. |
view | The Unique Identifier of a View record. | This sets the currently displayed view. Make sure to choose a View record that is linked to the Calendar record, otherwise this property will be ignored. |
startDate | A date string in almost any kind of format. | This sets the start date of the currently displayed view. |
prototypeReservation | An object that represents a Reservation record. | Allows you to prepopulate fields on new reservations being created on the calendar, even if that field is not displayed on the reservation form. Note: you can include junctions (such as ReservationContacts) or service reservations in the prototype. |
dynamicFilters | An object containing dynamic filter options. | Sets initial values for the dynamic filters available in the multi resource calendar. |
maxHeight | An integer. | The maximum pixel height that the calendar will stretch to in pixels or percent of window height. If the content is larger, a scroll bar will be shown. |
maxHeightUnit | A string with value “px” or “vh”. | The unit used for the maximum height of the calendar. Either pixels (px) or percentage of window height (vh). |
hiddenDimensionFilters | A list of filter objects. | Sets filters on the dimension records shown in the calendar. These filters are not visible to users. |
hiddenReservationFilters | A list of filter objects. | Sets filters on the reservation records shown in the calendar. These filters are not visible to users. |
filterIdentifierPrefix | A string. | Any calendars with the same filterIdentifierPrefix will share saved filters. By default the name of the calendar record is used. This allows you to share filters between calendars or have separate filters for the same calendar. |
unfilteredDimensionIds | A list of record ids. | Allows you to limit the dimension records that are displayed on the calendar. Any additional filters will never allow records outside of this list to be displayed. |
isReadOnly | Boolean | When this property is set to |
availabilityFilteringEnabled | Boolean | When enabled all dimension records that are fully unavailable in the current view will be hidden. |
mdaContext | MDAContext | Context for filtering MDavailabilities. |
...
Property | Expected Value | Description |
---|---|---|
calendarId* | The Name of a Calendar record. | This sets the configuration based on the linked Calendar record. |
recordId* | The id of a dimension record. | This sets the dimension record for this calendar. |
dimensionIds | A list of dimension record ids. | Instead of using the recordId property, utilize this property to display reservations for multiple records in the calendar. It requires a Javascript Array containing the record-ids to be assigned. |
view | The Unique Identifier of a View record. | This sets the currently displayed view. Make sure to choose a View record that is linked to the Calendar record, otherwise this property will be ignored. |
startDate | A date string in almost any kind of format. | This sets the start date of the currently displayed view. |
prototypeReservation | An object that represents a Reservation record. | This can be used to prepopulate fields on new reservations being created on the calendar, even if that field is not displayed on the reservation form. Note: you can include junctions (such as ReservationContacts) or service reservations in the prototype. |
maxHeight | An integer. | The height of the calendar in pixels or percent of window height. The single calendar does not automatically resize based on the height of the content of the calendar like the multi calendar does. |
hiddenReservationFiltersmaxHeightUnit | A list of filter objects.Sets filters on the reservation records shown in the calendar. string with value “px” or “vh”. | The unit used for the maximum height of the calendar. Either pixels (px) or percentage of window height (vh). |
hiddenReservationFilters | A list of filter objects. | Sets filters on the reservation records shown in the calendar. These filters are not visible to users. |
filterIdentifierPrefix | A string. | Any calendars with the same filterIdentifierPrefix will share saved filters. By default the name of the calendar record is used. This allows you to share filters between calendars or have separate filters for the same calendar. |
isReadOnly | Boolean | When this property is set to |
...
Property | Expected Value | Description |
---|---|---|
calendarId* | The Name of a Calendar record. | This sets the configuration based on the linked Calendar record. |
recordId* | The id of a dimension record. | This sets the record of the page that the calendar thinks it is displayed on. |
objectApiName* | The sObject API name for the recordId | This sets the sObjectType of the page that the calendar thinks it is displayed on |
recordLookupToDimension** | String | The api name of the field on the record specified by recordId that contains the Id of the record that should be used as dimension record. |
dimensionRecordLookupInfo** | String | The api name of the related list sObject + the lookup on the related sObject to the primary sObject. For example if you want to display all the resources of a certain Resource type you could provide B25__Resource__c.B25__Resource_Type__c |
view | The Unique Identifier of a View record. | This sets the currently displayed view. Make sure to choose a View record that is linked to the Calendar record, otherwise this property will be ignored. |
startDate | A date string in almost any kind of format. | This sets the start date of the currently displayed view. |
prototypeReservation | An object that represents a Reservation record. | This can be used to prepopulate fields on new reservations being created on the calendar, even if that field is not displayed on the reservation form. Note: you can include junctions (such as ReservationContacts) or service reservations in the prototype. |
maxHeight | An integer. | The maximum pixel height that the calendar will stretch to. If the content is larger, a scroll bar will be shown. |
maxHeightUnit | A string with value “px” or “vh”. | The unit used for the maximum height of the calendar. Either pixels (px) or percentage of window height (vh). |
hiddenReservationFilters | A list of filter objects. | Sets filters on the reservation records shown in the calendar. These filters are not visible to users. |
hiddenDimensionFilters | A list of filter objects. | Sets filters on the dimension records shown in the calendar. These filters are not visible to users. |
filterIdentifierPrefix | A string. | Any calendars with the same filterIdentifierPrefix will share saved filters. By default the name of the calendar record is used. This allows you to share filters between calendars or have separate filters for the same calendar. |
mdaFilteringEnabled | Boolean | Will hide any sObjects that are not available because of availabilities. If you use multi dimensional availabilities it will use the record passed through recordId as the context for the multi dimensional availabilities. |
isReadOnly | Boolean | When this property is set to |
...
Filters can be grouped by using a logicalOperator, allowing you to do AND and OR statements in the grouping. For Exampleexample:
Code Block | ||
---|---|---|
| ||
{ type: 1, logicalOperator: 'OR', subFilters: [ { 'fieldName': 'Name', 'operator': '=', 'value': 'Awesome'}, { 'fieldName': 'Name', 'operator': '=', 'value': 'Nice'} ] } |
...
Code Block |
---|
/* calendar.cmp */ <aura:component implements="flexipage:availableForAllPageTypes" access="global"> <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> <aura:attribute name="myFilters" type="Object[]" /> <B25:multiCalendarWrapper calendarId="Resources" view="week" startDate="2020-12-31" hiddenDimensionFilters="{!v.myFilters}" > </B25:multiCalendarWrapper> </aura:component> /* calendarController.js */ ({ doInit: function (cmp, event, helper) { var recordId = cmp.get('v.recordId'); cmp.set('v.myFilters', [ { 'fieldName': 'B25__Is_Active__c', 'operator': '=', 'value': 'true'}, { type: 1, logicalOperator: 'OR', subFilters: [ { 'fieldName': 'Name', 'operator': '=', 'value': 'Awesome'}, { 'fieldName': 'Name', 'operator': '=', 'value': 'Nice'} ] } ]); } }) |
...
Multiple Values
For use cases where checking against multiple values is required, the IN
and NOT IN
keywords can also be used to simplify your filters. For example:
Code Block |
---|
/* calendarController.js */
({
doInit: function (cmp, event, helper) {
var recordId = cmp.get('v.recordId');
cmp.set('v.myFilters', [
{ 'fieldName': 'B25__Is_Active__c', 'operator': '=', 'value': 'true'},
{
type: 1,
logicalOperator: 'OR',
subFilters: [
{ 'fieldName': 'Name', 'operator': 'IN', 'values': ['Awesome', 'Nice', 'Terrific']}
]
}
]);
}
})
|
Anchor | ||||
---|---|---|---|---|
|
...
Code Block |
---|
/* calendar.cmp */ <aura:component implements="flexipage:availableForAllPageTypes" access="global"> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <aura:attribute name="dynamicFilters" type="Object" /> <B25:multiCalendarWrapper calendarId="Resources" view="week" startDate="2024-04-12" dynamicFilters="{!v.dynamicFilters}" > </B25:multiCalendarWrapper> </aura:component> /* calendarController.js */ ({ doInit: function (cmpcomponent, event, helper) { component.set("v.dynamicFilters", { hideRowsWithoutReservations: true, availableResourceFilter: { enabled: true, fromDateTime: '2024-04-12T12:30:00.000Z', untilDateTime: '2024-04-19T12:30:00.000Z' } }); } }) |
...