Lookup for storage and tracking dimensions

Hi All,

How to create lookup for storage dimension and tracking dimension using x++ code..?

Please tell me the possibilities...

  • Hi All,

    Found the answer..

    Override lookup method of stringedit control and write the following code.It is for storage dimension..and use the same for tracking dimension(Change the table to EcoresTrackingDimensionGroup)..

    public void lookup()
    {    
        Query query = new Query();
        QueryBuildDataSource queryBuildDataSource;
        
    
        SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(EcoResStorageDimensionGroup), this); 
    
        sysTableLookup.addLookupField(fieldNum(EcoResStorageDimensionGroup, Name));
        sysTableLookup.addLookupField(fieldNum(EcoResStorageDimensionGroup, Description)); 
    
        queryBuildDataSource = query.addDataSource(tableNum(EcoResStorageDimensionGroup));   
    
        sysTableLookup.parmQuery(query);
    
        sysTableLookup.performFormLookup();
    }

Related
Recommended