Options

Web Services - Filter on Page including @ returns no records

JutJut Member Posts: 72
edited 2010-02-14 in NAV Three Tier
Hi Mibuso-fans,

I am currently working with web services and an issue arises that I am unable to resolve. I publish the standard pages (e.g. Contact-Page) and develop in my C#-application against that scheme. Everything works fine unless I try to filter on fields that contain special characters such as "@".

The following example shows my code:

List<Contact_Filter> filterArray = new List<Contact_Filter>();
Contact_Filter contactFilter = new Contact_Filter();
contactFilter.Field = Contact_Fields.Name;
contactFilter.Criteria = "testmail";
Contact[] contactList = new Contact[1000];
filterArray.Add(contactFilter);

contactList = contactWs.ReadMultiple(filterArray.ToArray(), "", 50);

The contactList is empty even if contacts in NAV have exactly that Name assigned. If I work with XML-Ports instead of Pages, @-characters are no problem.

Is this a common problem? Is a workaround or a solution available?

Thanks!
Jut

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    A workaround, it's not the best, is to substitute it with question mark.


    "test@mail";

    would be

    "test?mail";

    I would still send this to MS to fix if it's not working.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.