Wednesday 18 December 2013

Form as a lookup with multi-tab Page lookup


Step 1: Create a Form for lookup called “CustVendLookup” with following designs:

\
Figure 1 Create CustVendLookup

Step 2:  Override run() and init() methods on "CustVendLookup" Form and write below code-
                 public void run()
                 {
                         FormStringControl callingControl;
                         boolean           filterLookup;
                         ;
                         callingControl = SysTableLookup::getCallerStringControl(element.args());
                         filterLookup =   SysTableLookup::filterLookupPreRun(callingControl,
                                                                                        AccountNum,CustTable_ds);
                         super();
                         SysTableLookup::filterLookupPostRun(filterLookup,callingControl.text(),
                                                                                       AccountNum,CustTable_ds);
                }

              public void init()
               {
                       super();
                      element.selectMode(AccountNum);
               }

Step 3: Create a EDT called “CustVendLookupEDT” and set property “FromHelp – CustVendLookup” form.

Step 4: Create a table called “CustVendTable”with one field called “FromAsLookup” and set property ExtendedDataType – CustVendLookupEDT”.

Step 5: Create another form called “ChangeLookup” with below designs-

Figure 2 Create second form “ChangeLookup”

Finally, Open the “ChangeLookup” form and click on lookup with FromAsLookup field. And you will see a lookup with two tab pages Customer and Vendor.

Figure 3 : Result.

1 comment:

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...