Lookup Trigger

bhuberbhuber Member Posts: 78
edited 2001-03-08 in Navision Financials
On a request screen I need to do a lookup to a table (Batch) from a textbox using a filter from another testbox (Template). It appears that I can not use the normal table relation properity to filter on the selected template. I believe I will need to use the Lookup trigger on the text box for batch. Can anyone give me a reference in Navsion code that I can use as a good example on how to do this.

Comments

  • trifftriff Member Posts: 23
    I do not know where standard navision uses the on lookup trigger but here is some code I used recently to restrict the lookup of a vendor. I think the code explains itself.
    You should also use the onvalidate triger to test that a user has not typed in an invalid entry.


    Vend.SETFILTER("No.",'%1|%2',"Shipper No",Setup."Cust and excise");
    VendForm.SETTABLEVIEW(Vend);
    VendForm.LOOKUPMODE:=TRUE;
    IF VendForm.RUNMODAL = ACTION::LookupOK THEN BEGIN
    VendForm.GETRECORD(Vend);
    VALIDATE("Duty No",Vend."No.");
    END;
Sign In or Register to comment.