Wednesday, 13 July 2016

Dimesion value attribute



static RecId DefaultDimension(Args _args)
{
     DimensionAttributeValueSetStorage   valueSetStorage = new DimensionAttributeValueSetStorage();
     DimensionDefault                               result;
     DimensionAttribute                            dimensionAttribute;
     DimensionAttributeValue                   dimensionAttributeValue;

    dimensionAttribute = dimensionAttribute::findByName("BusinessUnit");
    dimensionAttributeValue =  dimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,'001',false,true);
    valueSetStorage.addItem(dimensionAttributeValue);
   
    dimensionAttribute = dimensionAttribute::findByName("Department");
    dimensionAttributeValue =  dimensionAttributeValue::findByDimensionAttributeAndValue(dimensionAttribute,'022',false,true);
    valueSetStorage.addItem(dimensionAttributeValue);
   
     result = valueSetStorage.save();
     info(strfmt("%1",result));
}

================================================
[‎14-‎07-‎2016 12:16] Meenakshi Sharma:
static void getDimensions(Args _args)
{
    container   myContainer;
   
    myContainer = ["402000-10-55-101010-10-10-100","402000",6,"Location","10","Department", "55","Employee","101010", "BusinessUnit","10","ProfitCenter", "10", "CostCenter","100"];
   
    info(strFmt("%1",AxdDimensionUtil::getLedgerAccountId(myContainer)));

}
 ==================================


No comments:

Post a Comment