Web Services ignore Provider ID on linked subpages

ichladilichladil Member Posts: 68
edited 2012-05-03 in NAV Three Tier
Hello,

I wanted to create a page that shows Sales Header (Order), related Sales Lines , for each Sales Line related Reservation Entries in separate list parts on the same page. I also want to expose such a page as a web service.
It was not difficult to achieve this behaviour in RTC client using ProviderID on Reservation Entries pointing to Sales Lines list. So in RTC client the page works as expected.

However when I have published such a page as a web service and wanted to read the sales order the following issues raised:
1) The ReservationEntry and Sales Line subpage are linked also by "Reservation Entry"."Source Ref. No." = SalesLine."Line No." - however web services when reading the sales order complains that I have to use integer as Source Ref. No. This seems to be caused by the fact that Sales Line."Line No." (integer) is field4 and field4 in sales header corresponds to Bill-to Customer No (Code). Web Services seems to be ignoring ProviderID and taking the link values from the header only!
2) Also ReservationEntry."Source Sub Type" = SalesLine."Document Type" = SalesHEader."Document Type". However webservice complains that value must not be Order (in Source Sub Type) and it must be 0,1,2,3... (which are actual option values on Source Sub Type). Well I have bypassed this limitation by using constant value for Source Sub Type - but more flexible solution would be better.

Any hints on how I may achieve the desired functionality using standard NAV web services?

Thanks,
Igor

Comments

  • kinekine Member Posts: 12,562
    I assume that solution will be to use separate webservices. Page Webservices are somehow "lightweight" system to get some simple data from the database, not complex one. Or use codeunit and xmlport to read complex data.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ichladilichladil Member Posts: 68
    Thanks Kine,

    I am aware about the alternative solutions I may use. In the case that I cannot make it working with pages as it is, it's maybe up to somebody from Microsoft to either make it working with ProviderID, or make it ignoring the subpages linked via ProviderID (so that I cannot see these as classes in .NET), or make it fail (this is perhaps worst option) in the way that it is clear that ProviderID is not supported. I just consider the current behavior the bug as I cannot use such a published page at all.

    Regards,
    Igor
  • kinekine Member Posts: 12,562
    I agree. Best is to open Service Incident and describe it as a bug. In this way the product team will be aware of that and it will be on them if they will create hotfix or something else.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.