Options

No filter paramether in page web service

rhpntrhpnt Member Posts: 688
edited 2009-10-24 in NAV Three Tier
It seems to me that page web services with a source table which primary key consists of more than one field do not include the "entity_filter" parameter in the ReadMultiple method. Any ideas of how to filter records in this ws?

Answers

  • Options
    rhpntrhpnt Member Posts: 688
    Anyone?
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    I just tried to expose the Post Codes page (367)

    The Read function takes all the primary fields (in this case Code, City)

    and the ReadMultiple can be used like normally:
    PostCodesRef.PostCodes_Service service = new PostCodesRef.PostCodes_Service();
                service.UseDefaultCredentials = true;
    
                PostCodesRef.PostCodes_Filter filter = new PostCodesRef.PostCodes_Filter();
                filter.Field = PostCodesRef.PostCodes_Fields.City;
                filter.Criteria = "*ham*";
                PostCodesRef.PostCodes[] postcodes = service.ReadMultiple(new PostCodesRef.PostCodes_Filter[] { filter }, null, 0);
    

    Can you post some more info about what you do differently?
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    rhpntrhpnt Member Posts: 688
    I didn't try anything yet, because of the missing entity_filter parameter in the ReadMultiple method (like in the attaches screenshot). I figured to check it out with the pro's first before I jump head first into trouble.

    Thanks for the reply. I'll try it.

    Regards!
    ws1.gif 26.2K
  • Options
    freddy.dkfreddy.dk Member, Microsoft Employee Posts: 360
    I have never seen something like that before - it looks like you have no primary key (since you have no Read method and no filters in ReadMultiple)
    Can you post the table definition (showing fields, types and the key definitions)
    Freddy Kristiansen
    Group Program Manager, Client
    Microsoft Dynamics NAV
    http://blogs.msdn.com/freddyk

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
  • Options
    rhpntrhpnt Member Posts: 688
    Hi Freddy,

    I found the source of the problem. The page didn't have any Container, Group or Fields defined (I simply forgot). After adding the mentioned objects everything is back to normal.

    I discovered it by publishing the default warehouse employees page (7328) as a service where everything was in place as it should be. Only my page which had the same source table (warehouse employees) had those things missing.

    May be helpfull for future reference...

    Thanks for the time!
Sign In or Register to comment.