Lookup values from different company

public static void lookupInvoiceAsset(FormControl _formControl)
{
    SysTableLookUp          lookUp;
    Query                   q   = new Query();
    QueryBuildDataSource    qbds= q.addDataSource(tableNum(KMCollection));
    DataAreaId              masterCompany;
    
    //super(_formControl, _filterStr);
   
    if (!masterCompany)
    {
        masterCompany = curext();
    }
    
    q.allowCrossCompany(true);
    q.addCompanyRange(masterCompany);
    
    lookUp = SysTableLookUp::newParameters(tablenum(KMCOllection), _formControl);
    lookUp.parmQuery(q);
    lookup.addLookupfield(fieldnum(KMCOllection, kmCollectionId));
    lookup.addLookupfield(fieldnum(KMCOllection, description));
    lookup.addLookupfield(fieldnum(KMCOllection, kmCollectionTypeId));
    lookup.performFormLookup();
}


 

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units and "buy me a coffee" link.
Join us.

Blog Tags