AfDataContainer.get_Container Method [AX 2012]
Gets the value of the specified container.
Syntax
public AfDataContainer get_Container(str _name, [boolean _createIfAbsent])
Run On
Called
Parameters
- _name
Type: str
The name of the container.
- _createIfAbsent
Type: boolean
A Boolean value that indicates whether the container should be created if it is not already in the data container; optional.
Return Value
Type: AfDataContainer Class
The value of the specified container.
Remarks
If the specified data item is present and is of type AfDataContainer, then this method returns its value.
If the data item is absent or has a type of something other than AfDataContainer, e.g., it is a primitive type or a data container list, then this method returns null Nothing nullptr unit a null reference (Nothing in Visual Basic) .
If the data item is absent and the _createIfAbsent parameter is set to true, then a data container of a type specified by the data container descriptor (see the get_Descriptor method) is created, added to the data container, and returned to the caller. If the descriptor does not have an entry for the specified data item but allows for the data container to have unknown data items, a data container of type generic is used (see the DataContainerTypes.Generic macro).
Otherwise, an error is thrown.