How to select Item from Lookup page

IvonaK
Member Posts: 115
Hi to all,
I have add a new page Action in P 31: Item List (picture 1).
When I call Action it is open a new page like picture 2.
I want when I select Item No from picture 2, to be selected in P: Item List.
Here is code that I have in Action in P 31:"Item List"
IF PAGE.RUNMODAL(50005,ItemAttributesFilters)=ACTION::LookupOK THEN
BEGIN
Item.GET(ItemAttributesFilters."Item No.");
// CurrPage.GETRECORD(Item);
// CurrPage.SETRECORD(Item);
CurrPage.SETSELECTIONFILTER(Item);
CurrPage.UPDATE;
END;
I try with, GETRECORD,SETRECORD,SETSELECTIONFILTER but still it doesen't work
I use NAV 2016.
Any advice,
Thanks a lot,
I have add a new page Action in P 31: Item List (picture 1).

When I call Action it is open a new page like picture 2.

I want when I select Item No from picture 2, to be selected in P: Item List.
Here is code that I have in Action in P 31:"Item List"
IF PAGE.RUNMODAL(50005,ItemAttributesFilters)=ACTION::LookupOK THEN
BEGIN
Item.GET(ItemAttributesFilters."Item No.");
// CurrPage.GETRECORD(Item);
// CurrPage.SETRECORD(Item);
CurrPage.SETSELECTIONFILTER(Item);
CurrPage.UPDATE;
END;
I try with, GETRECORD,SETRECORD,SETSELECTIONFILTER but still it doesen't work

I use NAV 2016.
Any advice,
Thanks a lot,
0
Answers
-
1.) Create your additional page as a Variable (pageVar)
2.) Filter a ItemRec to your needs
3.) PageVar.settableview(<filtered itemrec>)
4.) pagevar.runmodal
5.) pageVar.getRecord(someOtherItemRec);
6.) Rec.Setrange(someOtherItemRec."no.") -> Rec beeing your actual Record from the calling Page (rec)
7.) currpage.update(false)
Just writing up without actually trying it.
Should work like this though, if you need further help feel free to pm me the objects.Austrian NAV/BC Dev0 -
Hi Wisa123,
It works now with your advice.
Thanks a lot of
Best Regards,0 -
Hi Belias,
Yes you are right. Also it works like that.
Thanks a lot of
Best Regards,0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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