Hi all,
Hope you are fine!
I've faced with one trouble, and ask your assistance.
NAV 2013 R2
I run page with RecRef:
Name DataType Subtype Length
_RecRef RecordRef
_VarRecRef Variant
_RecRef.OPEN(23); //...few filters are set here _VarRecRef := _RecRef; IF PAGE.RUNMODAL(0, _VarRecRef) = ACTION::LookupOK THEN BEGIN _RecRef := _VarRecRef; END;
And it returns me a right RecRef, that's great. But if user changes filters on page, I can't catch this change. RecRef contains the same filters as it was before PAGE.RUNMODAL. Can I anyhow catch filters from the RecRef?
*This post is locked for comments
Unexpectedly, it's known issue of NAV 2013 R2. Please, refer the link: community.dynamics.com/.../bug-in-nav-2013-r2-preventing-correct-execution-of-getrecord-setselectionfilter-and-it-39-s-workaround
@Rajasekhar Y And that's impossible in my case. Anyway thanks!
Hi
To get the filters you need to define Page variable, Use the RecRef to find the Table ID and run the specific page depends on the Table Id using Case Statement.
@Rajasekhar Y, I use variants at the moment.
Name DataType Subtype Length
_RecRef RecordRef
_VarRecRef Variant
But I can't catch the filters set by use on the lookup page. Variant returns the same RecordRef as I send to it (please, look carefully at my example).
Hi
given links are reference to "How to use Variants" in Navision, so have a try with Variants to get the result.
@Nareshwar R. I looked through your links but there is no useful info for me. Yes, I've tried to use FieldRef to get new filters, but filters are blank.
@Rajasekhar Y I looked through your links but there is no useful info for me.
I really got stuck with this thing.
Hi
Then you need to pass variable as "Variant", refer the below how to use Variant
Hi,
Check these links.
forum.mibuso.com/.../transferring-filters-to-and-from-recordref
dynamicsuser.net/.../filter-in-recordref
Try using FieldRef.
Hope it helps.
And I can't use definite page like PageVar.RUN as I don't know exact table when I run the code.
Typically, it will be _RecRef.OPEN(_AnyTableNo);
Hi
Sorry, but it's impossible to use definite page because I don't know exact table when I run this code. Example below is just an example. Actually, instead of _RecRef.OPEN(23); I should use _RecRef.OPEN(_TableNo);
That's why I need your assistance bevause I don't see the way how to get filters after PAGE.RUNMODAL.
André Arnaud de Cal...
291,971
Super User 2025 Season 1
Martin Dráb
230,846
Most Valuable Professional
nmaenpaa
101,156