I think the ')' in your Item Description is being taken as the end of the syntax of the setfilter function.
That's why the error is occurring. I am not sure.
Makes me think about what exactly I need to do. So in this case I want to set an 'equal' filter, so I explicitly set it like that. Never failed me once.
Comments
I Don't know what version of Navision you are using or where exactly you have written this code or what error message you have received.
Still, I think you have made a fundamental mistake in the syntax of your code.
The syntax should be:
Item.SETFILTER(Description, '70-HK-(W1)');
Check it out. It might help.
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
Does anyone know why?
I think the ')' in your Item Description is being taken as the end of the syntax of the setfilter function.
That's why the error is occurring. I am not sure.
My world: Dynamics NAV,SQL and .NET
CEO at Solving Dynamics
http://www.solvingdynamics.com
Maybe u can try to use coding below:
Thank you,
Kok Keong
The previous coding got problems. u just ignore it.
Below is the correct coding
It works!
Thanks!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
Are you actually setting that filter? Or are you setting a filter usering a variable that could contain that value?
Never code "hard" filters like that... right?
If it was hard to write, it should be hard to understand."
So, the actual code would be like: Where FilterValue is a variable with the filter criteria in it.
RIS Plus, LLC