LookUp Form
ngebhard
Member Posts: 127
Hello everybody,
we are using a form list for a table that has a different lookup form. Therefore the ok- and cancel-buttons don't work. How can we simulate this lookup-functions. Any ideas?
For example:
within the item table we have an individual item card which uses an individual item list. Going to the item list from the item card, there is no way to select an item (i.e. with enter) that is shown in the item card (like in the lookup table). You need to remember the item no, go back with Escape and search for the item no.
Thanks for any inspiration.
Best regards,
Nicole Gebhard
we are using a form list for a table that has a different lookup form. Therefore the ok- and cancel-buttons don't work. How can we simulate this lookup-functions. Any ideas?
For example:
within the item table we have an individual item card which uses an individual item list. Going to the item list from the item card, there is no way to select an item (i.e. with enter) that is shown in the item card (like in the lookup table). You need to remember the item no, go back with Escape and search for the item no.
Thanks for any inspiration.
Best regards,
Nicole Gebhard
ProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt
0
Comments
-
To simulate the 'LookupTable' PushAction property, you have to include code that looks something like this in the OnPush trigger of a menu item or command button:
CurrForm.SAVERECORD; MyLookupForm.SETTABLEVIEW(Rec); MyLookupForm.SETRECORD(Rec); MyLookupForm.SETLOOKUPMODE(TRUE); IF MyLookupForm.RUNMODAL = Action::LookupOK THEN MyLookupForm.GETRECORD(Rec); CLEAR(MyLookupForm);
0 -
Hi fb!
I know that it is similar to the posted coding but it won't work that way. Any other hints?
Thanks a lot!
N.GebhardProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt0 -
-
I refered to the coding posted by fb:
CurrForm.SAVERECORD;
MyLookupForm.SETTABLEVIEW(Rec);
MyLookupForm.SETRECORD(Rec);
MyLookupForm.SETLOOKUPMODE(TRUE);
IF MyLookupForm.RUNMODAL = Action::LookupOK THEN
MyLookupForm.GETRECORD(Rec);
CLEAR(MyLookupForm);
But this way it won't work. It must be similar to this, but I just don't get it! :oops:ProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt0 -
Sorry to ask a stupid question... :oops:
Are you sure your code is in the OnLookUp trigger (that means, are you sure your LookUp property of the control is set to Yes ?
Usually, this works..... you should have a little problem somewhere...
You can also define the filters instead of linking directly the tables :TableToLookIn.SETRANGE(Field,Rec.Field); TableToLookIn.SETRANGE("Field 2",Rec."Field 2"); IF FORM.RUNMODAL(Form ID,TableToLookIn) = ACTION::OK THEN My destinationField := TableToLookIn.Field ELSE IF FORM.RUNMODAL(Form ID,TableToLookIn) = ACTION::Close THEN My destinationField := TableToLookIn.Field;
This is something wich works easily.... You should to find what's the problem or give us more elements..
Good luck and courage.My candle burns by both ends, it will not last the night,
But oh my foes and oh my friends, it gives a lovely light0 -
I made a typical beginner error. I forgot to delete the entries in the menu button "action > run object" as I entered the coding in the push trigger.
Therefore it didn't work!!
Sorry... :oops:
Now it works perfect!!
Thanks a lot
ProTAKT Projekte & Business Software AG
Microsoft Dynamics NAV Partner
Bad Nauheim, Germany
http://www.protakt.de
http://twitter.com/protakt0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
