I would like to pass a number of setfilter to a function but instead of passing one by one I would like to use the copyfilter. Can anyone give me some guidance on this pls?
I have applied 3 setfilters to a record variable in function a in codeunit a. I have passed the record into Function B in codeunit B. When I am trying to use the copyfilters in function B the filters are not passing over.
you can pass the entire record variable, it will maintain the filters you set.
*EDIT: just noticed i didn't told that you have to pass the variable by ref in order to obtain the filter set with this method, sorry :oops:
alternatively (never tried before) you can pass the result of GETVIEW function as a parameter and use SETVIEW to replicate the set of filters
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
Comments
What are you trying to achieve?
Have you tried passing down a filter record variable and copyfiltler from that ?
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
How are you setting the filters?
Look at this post
viewtopic.php?f=23&t=29933&hilit=pass+filters
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
*EDIT: just noticed i didn't told that you have to pass the variable by ref in order to obtain the filter set with this method, sorry :oops:
alternatively (never tried before) you can pass the result of GETVIEW function as a parameter and use SETVIEW to replicate the set of filters
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Is it a local v's global variable problem?
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html