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

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...