I have a problem.
I want to make a permanent filter in a form during runtime.
I use this for hiding the data for the user.
When a user opens a form i will filter only those forms he can see.
But when the user removes the filter from the form he can see all the forms. I've tried to set a view but the result is the same. The only solution i see is to put the view during design time but then i can't retrieve the user id. Does someone has a solution for this. I suppose i'm not the only one having this problem. :?:
Realisations are only limited by the borders of imagination
0
Comments
SETFILTERGROUP(2);
SETFILTER(...);
SETFILTERGROUP(0);
But ... what do you mean by "I cannot retrieve the user ID" ?
set higher filter group, set filter, return filtergroup back to 0...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
It does what it has to do.
Concerning the User id i can't use the user id during design time.
So i can't set the view of a form to
where PurchaseHeader."Purchaser Code"=CONST(USERID)
in design mode.
But using a filtergroup does it during runtime
This is correct but it is better to use a filtergroup of 6 or higher, because filtergroups 0 to 5 are reserved by Navision. Look into the help of "SETFILTERGROUP" for more info.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!