Product/Item Lookup

Hi Everyone,

Good Day!

I need your guide and help, i need some references, links, tutorials.

OK here's the thing, i create a form and add Grid, in the first column i want to add Lookup value which is Product/Item Master, upon selecting the Item
i want to get the following details.

ITEM CODE
DESCRIPTION BAR CODE BRAND CATEGORY LAST PURCHASE PRICE
0000000001 ITEM 1 12345 SEAGATE HDD 
100
0000000002 ITEM 2 67890 ECO SUPPLY 50

should have any question or clarification just let me know.

i will appreciate your quick response with regards to my concern..

Thank you in advance. 

Parents
No Data
Reply
  • Hi JEMT,

    I have a question is all the fields are coming from the same table or from different tables?

    If it is a from the same Table you can override the Lookup method and add the following code

    public void lookup()
    {
        Query query = new Query();
        QueryBuildDataSource queryBuildDataSource;
        QueryBuildRange queryBuildRange; 
    
        SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(TableName), this); 
    
        sysTableLookup.addLookupField(fieldNum(TableName, FIELD));
    
        queryBuildDataSource = query.addDataSource(tableNum(TableName));
    
        sysTableLookup.parmQuery(query);
    
        sysTableLookup.performFormLookup();
    
        //super();
    }

    and also override the modified method for the same field and in that write the code to get the selected ItemCode and from that, you can get all the fields from the table.

Children
Related
Recommended