Friday, October 24, 2014

Default Dimension Value by lookup through X++ Ax 2012

// Default Dimension Value by lookup... Single

public void lookup()
{
    Query query = new Query();
    QueryBuildDataSource queryBuildDataSource;
    QueryBuildRange queryBuildRange;

    SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum (DimensionFinancialTag), this);

    sysTableLookup.addLookupField(fieldNum(DimensionFinancialTag, value));
    sysTableLookup.addLookupField(fieldNum(DimensionFinancialTag, Description));

    queryBuildDataSource = query.addDataSource(tableNum(DimensionFinancialTag));

    queryBuildRange = queryBuildDataSource.addRange(fieldNum(DimensionFinancialTag, FinancialTagCategory));
    queryBuildRange.value(queryValue(5637144577));


    sysTableLookup.parmQuery(query);

    sysTableLookup.performFormLookup();
    //super();
}

No comments:

Post a Comment

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...