recSetup.GET; CLEAR(recItem); recItem.SETRANGE("Inventory Posting Group",recSetup."Raw material Inv. Posting Grp."); recItem.SETRANGE("Item Category Code",recSetup."Def. Item Category"); CASE pPriceBand OF 'A' : recItem.SETRANGE("Price Band",'A'); 'B' : recItem.SETFILTER("Price Band",'%1|%2','A','B'); 'C' : recItem.SETFILTER("Price Band",'%1|%2|%3','A','B','C'); END; IF ISSERVICETIER THEN BEGIN //If run from RTC.. IF PAGE.RUNMODAL(0, recItem) = ACTION::LookupOK THEN BEGIN pCode := recItem."No."; END; END ELSE BEGIN //If run from Classic.. IF FORM.RUNMODAL(0, recItem) = ACTION::LookupOK THEN BEGIN pCode := recItem."No."; END; END;
Comments
Please specify the page ID which you want you to Run.
IF ISSERVICETIER THEN BEGIN //If run from RTC..
IF PAGE.RUNMODAL(50000, recItem) = ACTION::LookupOK THEN BEGIN
pCode := recItem."No.";
END;
END ELSE BEGIN //If run from Classic..
IF FORM.RUNMODAL(0, recItem) = ACTION::LookupOK THEN BEGIN
pCode := recItem."No.";
END;
END;
Reason to give specific Page ID:
Table does not have LookupPageID Property.
Muthu
I did as you suggested but unfortunately it still does not work.
I used PageID of 31 which is Item List