Tuesday, October 1, 2013

[AX 2012] Note to Self: Get Dimension Value of An Attribute

A sample code to get a value of an attribute dimension:

static void MyJob(Args _args)
{
  info(
    DimensionAttributeValueSetStorage::find(
      SalesLine::findRecId(1234567890).DefaultDimension)
        .getDisplayValueByDimensionAttribute(
          DimensionAttribute::findByName("AttributeName").RecId));
}

No comments:

Post a Comment