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

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...