Hello developers, Can I put multiple lookup page because of item type on table(purchase line.No) Example.lookup item no with service type on purchase order Another one is lookup item no with inventory type on purchase invoice
You can have multiple list pages on one table. Only one page can be the Lookup page in the table's properties. You can programatically use the other pages in the OnLookup trigger of the fields for which you want to use the alternate lookup page.
The code in the OnLookup trigger would be something like:
if <condition which determines which lookup page to use> then
If PAGE.RUNMODAL(0,Item) = ACTION::LookupOK then
Validate("No.",Item."No.")
else
If PAGE.RUNMODAL(PAGE::"alternate lookup",Item) = ACTION::LookupOK then
Validate("No.",Item."No.");
You can have multiple list pages on one table. Only one page can be the Lookup page in the table's properties. You can programatically use the other pages in the OnLookup trigger of the fields for which you want to use the alternate lookup page.
The code in the OnLookup trigger would be something like:
if <condition which determines which lookup page to use> then
If PAGE.RUNMODAL(0,Item) = ACTION::LookupOK then
Validate("No.",Item."No.")
else
If PAGE.RUNMODAL(PAGE::"alternate lookup",Item) = ACTION::LookupOK then
Validate("No.",Item."No.");
Answers
The code in the OnLookup trigger would be something like:
if <condition which determines which lookup page to use> then
If PAGE.RUNMODAL(0,Item) = ACTION::LookupOK then
Validate("No.",Item."No.")
else
If PAGE.RUNMODAL(PAGE::"alternate lookup",Item) = ACTION::LookupOK then
Validate("No.",Item."No.");