Table in LOOKUP TRIGGER

Hi, I write code on TEXTBOX ONLOOKUP TRIGGER, now i want show a temprory table data in lookup,

is there any way to show tables data (selected fields) which i want to show

at the moment i write this line:

IF FORM.RUNMODAL(0,Customer) <> ACTION::LookupOK THEN

but this shows Customer List form

Any suggestion,

Thanks in advance :slight_smile:

Check the code wherein you have passed the record variable as customer table

Hi Ahmed,

First you when you ask a question always remember to write which version of Dynamics NAV your question is about and which type of object your issue relates to.

I assume that you’re doing is to create a lookup in temporary table from a form. And that the table you want to make a lookup to is based on the Customer table? The simple way to do is the way you’re doing it. But this will always use the standard lookup form.

Instead you can specify another form id so FORM.RUNMODAL(21,Customer) would use the Customer Card instead of the list.

If that’s not enough either, then you can use the SourceTableTemporary property, but that requires that you creates a new form and places the code here.

Hi Ahmed,

Did you get an answer to your question? Did it help you? The members and moderators here on DUG use our spare time and help you for free, all we ask in return is that you spent a few seconds to let us know if we helped you solve your problem.

If any of the suggestions helped you solve your question/problem, then please click the “Verify Solution” on the answer that helped you, so that we can see that your problem is now “resolved”. Otherwise let us know how if there is something else you like to know.

Have a nice day! [:)]

What you can do is to declare the Customer table as “Temporary” record and add records to this temporary table,

Then run with your original code,

The system will show the records from the temporary table only.