Skip to main content
Skip table of contents

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

getDescendants
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
CODE
global static B25.DimensionHierarchy.Result getDescendants(B25.DimensionHierarchy.Context)
Parameters
CODE
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
CODE
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

Context
Description

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

Properties
CODE
List<Id> parentIds

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

CODE
List<Id> typeIds

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.

Result
Description

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

Properties
CODE
List<Id> descendantIds

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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.