Share via


DimensionAttributeSetStorage.addItem Method [AX 2012]

Adds the specified dimension attribute and enumeration value to the set.

Syntax

public int addItem(
    RecId _dimensionAttributeId, 
    HashKey _dimensionAttributeHashKey, 
    int _enumerationValue)

Run On

Called

Parameters

  • _enumerationValue
    Type: int
    The enumeration value of the dimension attribute to add.

Return Value

Type: int
The index of the value in the set.

Remarks

When the dimension attribute associated with the value is already in the set, that index will be updated to point to the new value and the same index will be returned. When the dimension attribute is not yet in the set, it will be added to the end and the index of the new value will be returned.

The set ordering and index are stable for a running instance of the DimensionAttributeSetStorage class, but may change if the instance is persisted and reloaded. Index access is provided as a simplification for programmatic interaction and is not persisted to the database.

See Also

Reference

DimensionAttributeSetStorage Class