Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...