Problem with Table OnLookup trigger code

Hello everybody! I have a question: Is it possible to write a code of OnLookup trigger (table) that will work exactly like Navision native? The problem is that when a code that works perfectly for data input doesn’t work for filtering in reports as request field. By the way, I couldn’t manage to write a OnLookup code that works for FlowFilters too[xx(] This is example of code i have: IF FORM.RUNMODAL(FORM::"Vendor List-AMT",Vend) = ACTION::LookupOK THEN BEGIN VALIDATE("Buy-from Vendor No.",Vend."No."); END; You can easily try it out by creating a report for your modified table and looking-up some filters.

In the globals or locals you declare VendorList “Vendor List-AMT” as form and then clear(VendorList); VendorList.settableview := vend; IF VendorList.RUNMODAL = ACTION::LookupOK THEN BEGIN VendorList.get(vend); VALIDATE("Buy-from Vendor No.",Vend."No."); END;

No, for filters and request fields there is no possibility to get around the tablerelation.

Flavio, I have tried it every way… I think that problem appears when assigning new value, because for filters it isn’t validation or simple assigning as “:=”, but it is filter setting… Thomas, are you 100 % shore about your position?

Yep, Thomas is right. Unfortunately, once you put code on the OnLookup trigger, this lookup won’t be available for the lookup in the report filter. If you want to check it yourself, set up a new report based on T246, Requisition Line, and try to filter for Requester ID… won’t work, definitly some bug… Saludos Nils

Somthing strange regarding table OnLookup-trigger happened in some Attain-version; what used to work in Financials doesn’t work in Attain - take a look at,table,attain,financials or search this forum for “table onlookup”