Hi,
Did anyone of you experienced a filter issue in Navision 4.00 SP2?
I have a very weird filter problem on the Reservation Entry table.
I try to set a setrange on a field in a function of a CodeUnit. That didn't work. I copied the EXACT data in a standalone codeunit for testing and it works.
Any help is welcome.
Thanks.
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
WITH ResEntry DO BEGIN
SETCURRENTKEY("Source ID","Source Ref. No.");
SETRANGE("Source ID",ReqLine.'REQ.');
SETRANGE("Source Batch Name",'DEFAULT');
SETRANGE("Source Ref. No.",30000);
SETRANGE("Source Type",246);
SETRANGE("Source Subtype",0);
IF FIND('-') then //I even tried FINDSET but no results either.
message('Found records');
END;
Notes:
ResEntry is a local var, so reset is not needed.
ResEntry = Reservation Entry table.
When I remove the filters it finds the records.
When I copied over the exact code to a new standalone CodeUnit it works fine.
In you code where it is not working
before doing find('-')
put this code
messsage(ResEntry.getfilters);
and write down what the filter and post it here.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
That is what I already did. I has the correct filters. The funny thing is, it's working in a standalone codeunit, but not here. I thought maybe somewhere in the code earlier ResEntry records might have been deleted and no COMMIT being set, but the entries are there. It just should give a recordset back.
SETRANGE("Source Ref. No.",3);
See if it finds the record.
It's basically almost imposible to replicate this, so need your help to get down to the problem.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Boy that took me while.
Thanks for your support.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n