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,
Answers
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.
It works now with your advice.
Thanks a lot of
Best Regards,
if page.runmodal(50005,ItemAttributesFilters)=ACTION::LookupOK THEN
get(itemattributesfilters."item no.");
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Yes you are right. Also it works like that.
Thanks a lot of
Best Regards,