Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Main Account lookup with filter of the an account structure

$
0
0

How can I create the lookup for a Main account, but with filter to the active account structure in my form.

 I Know the main account is related to DimensionAttrValueLedgerOverride, but how to get from DimensionAttrValueLedgerOverride yo my account structure,

so on the end I get Main Account, joint datasource DimensionAttrValueLedgerOverride and ???

public void lookup()
        {
            Query query = new Query();
            QueryBuildDataSource queryBuildDataSource;
            QueryBuildDataSource queryBuildDataSource2;
            SysTableLookup sysTableLookup;
            DimensionAttribute dimensionAttribute;
            sysTableLookup = SysTableLookup::newParameters(tableNum(MainAccount),this);
            sysTableLookup.parmUseLookupValue(false);
            sysTableLookup.addLookupfield(fieldNum(MainAccount, MainAccountId));
            sysTableLookup.addLookupfield(fieldNum(MainAccount, Name));
            queryBuildDataSource = query.addDataSource(tableNum(MainAccount));
            queryBuildDataSource2 =queryBuildDataSource.addDataSource(tableNum(DimensionAttrValueLedgerOverride));
            queryBuildDataSource2.relations(true);
            ///SO WHAT next?
            sysTableLookup.parmQuery(query);
            sysTableLookup.performFormLookup();
        }


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>