DimensionHierarchy

Finds which child resources belong to a particular parent resource.

This supports going multiple layers deep into the hierarchy. So for example if you have countries with locations with buildings with rooms, allows you to find all rooms in a particular country.

This does not support non-resource dimensions. We might still add support for this at a later stage, which is why the class is named DimensionHierarchy instead of ResourceHierarchy.

Methods

Description

This method takes a list of parent resource ids, and an optional list of resource type ids. It returns all the children of the parents.

Signature

global static B25.DimensionHierarchy.Result getDescendants(B25.DimensionHierarchy.Context)

Parameters

B25.DimensionHierarchy.Context

An instance of B25.DimensionHierarchy.Context. This class wraps the input parameters: a list of parent resource ids, and an optional list of resource type ids.

Return Type

B25.DimensionHierarchy.Result

An instance of B25.DimensionHierarchy.Result. This contains a list of ids of all the children of the input parents.

Inner Classes

Description

This class wraps the input parameters: a list of parent resource ids, and an optional list of resource type ids.

Properties

A list of parent ids. The ids must be of SObject type B25__Resource__c.

Optional. If supplied, the result will only contain child resources of types contained in this list. The ids must be of SObject type B25__Resource_Type__c.

Description

This class wraps the result, which contains a list of all the child resources of the given parents.

Properties

A list of ids of all the descendants of the given parents.

 

GoMeddo Rest API

In the GoMeddo Rest API, a similar function, /resources/{ResourceId}/children, exists, which filters a list of dimension IDs to retain only those that are child records of the passed-on ID.

https://apidocs.gomeddo.com/#/resources/get_resources__resourceId__children