...
Excerpt |
---|
Allows you to find |
...
the ids of dimensions (such as Staff or Resources) that are available for a |
...
bgColor | white |
---|---|
titleBGColor | lightgray |
borderStyle | solid |
title | Methods |
...
given reservation. |
This functionality is also available in Lightning (Screen) Flow, see the last section of this page.
Methods
Expand | ||
---|---|---|
|
...
Declaration
DescriptionThis method returns a set with dimension ids that are available for the given input. Signature
|
...
Parameters |
...
Class that contains the input parameters for this method. See the inner class B25.AvailableDimensionIds.Context |
...
Returns
...
for more details. Return Type
Set containing all the dimension IDs that would not result in any conflicts, if used for the given Reservation and Dimension Field. |
...
bgColor | white |
---|---|
titleBGColor | lightgray |
borderStyle | solid |
title | Inner Classes |
...
borderStyle | solid |
---|---|
title | Context |
Properties
...
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DescriptionThis method is basically the same as
Signature
Parameters
A list of objects that contain the input parameters for this method. See the inner class B25.AvailableDimensionIds.Context for more details. Return Type
List of results, see the inner class B25.AvailableDimensionIds.Result for more details. |
Inner Classes
Expand | ||||
---|---|---|---|---|
| ||||
DescriptionThis class wraps the input parameters, most notably the dimension field that you are searching through and the reservation that defines the times as well as any conflict related properties.
Properties
Required. Reservation you want to get available dimensions for. B25__StartLocal__c and B25__EndLocal__c need to be set. |
...
Make sure that any fields that influence conflict checking are set (i.e. |
...
the status or the quantity), or the result might not contain all available dimensions. |
...
Required. The name of the dimension field you want to search an available ID for. I.e. 'B25__Resource__c'. |
...
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
hidden | true |
---|
...
title | On this page |
---|
...
Scope of dimension IDs to limit the search to. These have to be of the same SObject type as the dimension field that you are searching in. |
Note | ||
---|---|---|
| ||
The dimensionIds property narrows down the search scope. This greatly improves performance for dimensions with many records. It is recommended to fill this parameter when searching in dimensions with a large amount of records. |
Scope of dimension IDs that the invocable method searches through. This is a duplicate of the dimensionIds Set and is only used for
Reservation IDs to ignore in conflict checking. This allows you to exclude reservations you are in the process of moving. |
Expand | ||||
---|---|---|---|---|
| ||||
DescriptionThis class wraps the result, which contains a list of available dimension ids, as well as a single arbitrary available id for convenience. Properties
A list of all the available dimension IDs
A single ID of the first dimension in availableDimensionIds list. |
Example
This example shows how you can use the class in your own code:
Code Block |
---|
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 |
...