AvailableDimensionIds
Allows you to find the ids of dimensions (such as Staff or Resources) that are available for a given reservation.
This functionality is also available in Lightning (Screen) Flow, see the last section of this page.
Methods
Inner Classes
Example
This example shows how you can use the class in your own code:
public static Set<Id> getDimensions(B25__Reservation__c reservation, String dimensionFieldName, Set<Id> dimensionIds) {
B25.AvailableDimensionIds.Context context = new B25.AvailableDimensionIds.Context();
context.reservation = reservation;
context.dimensionFieldName = dimensionFieldName;
context.dimensionIds = dimensionIds;
return B25.AvailableDimensionIds.findAvailableDimensionIds(context);
}
GoMeddo Rest API
In the GoMeddo Rest API, a similar function called findAvailableDimensionIds exists, filtering a list of dimension IDs to retain only those where a specific reservation can be created.
https://apidocs.gomeddo.com/#/availability/post_findAvailableDimensionIds
Lightning (Screen) Flow Apex Action
This functionality is also available as an Apex Action in Lightning Flow, called 'Find available dimension records':
Set Input Values for the Selected Action | |
Dimension Field Name | Name of the Dimension Field to check |
Dimension Record Ids | List of IDs of Dimension records to check |
Excluded Reservation Ids | List of IDs of Dimension records to exclude |
Reservation | Reservation for which a Dimension record is needed |
Advanced > Manually assign variables | |
Available Dimension Id | Variable containing 1 resulting ID |
Available Dimension Ids | Variable containing 1list of resulting IDs |