How to set date filter using navision 2009 sp1 web service ?

smnehalsmnehal Member Posts: 14
edited 2011-08-13 in NAV Three Tier

I am using Navison 2009 SP1 and set the dat filter but it resturn zero.

following are the c sharp code.

CustomerRef.Customer_Service cservice = new CustomerRef.Customer_Service();
cservice.UseDefaultCredentials = true;

CustomerRef.Customer_Filter filter = new CustomerRef.Customer_Filter();
filter.Field = CustomerRef.Customer_Last_Date_Modified;
filter.Criteria = "=06/04/10";
CustomerRef.Customer_Filter[] filters = new CustomerRef.Customer_Filter[] { filter };

CustomerRef.Customer[] customers = cservice.ReadMultiple(filters, null, 0);

customers is getting no result;

How can i filter on date using Navision web service.



  • smnehalsmnehal Member Posts: 14
    I use the Linq to set the Date filter.

    thanks any way.
  • Est005Est005 Member Posts: 29

    I have the same problem, could perhaps tell how you set teh filter using Linq? Thanks for your help.
  • Est005Est005 Member Posts: 29

    Found the answer.

    you must ensure that the Windows user account that is to be used to execute the task has a User Personalisation record with the correct Language ID.7177 is the English - Southern Africa language ID and If you do not have a record, or you use the English (United States) setting then you will find date fields are validated using the US M/dd/YYYY date format. so either change/add a record to the User Personalisation table or format your date string like this mmddyyyy
Sign In or Register to comment.