No data on webservice from converted database

birrebirre Member Posts: 22
edited 2012-02-06 in NAV Three Tier
Hi

Im trying to fetch data from a webservice throught vb.net. The items seem to connect with the published web service page, but wont get any data. The problem is that the page has been created on a converted database where no other pages are inside the companies somehow.


When I try to run the page I receive this error
The Object Metadata does not exist. Identification fields and values: Object Type = 'Page', Object ID= '0'

Its a page created with the wizard, sourccetable Prod. Part Routing Line, all fields included. So the page has been published and I can succesfully connect it via IE and VS2010; but I don't get any data.

Here is the code
Dim baseURL As String = "http://db:7047/DynamicsNAV/WS/"

        Dim systemService As New SystemServiceRef.SystemService()
        systemService.Url = baseURL + "SystemService"
        systemService.UseDefaultCredentials = True
        Dim companies() As String = systemService.Companies()
        Dim cur As String = companies(0)

        Dim ProdPartPageURL As String = baseURL + Uri.EscapeDataString(cur) + "/Page/ProdPart"
        Console.WriteLine(vbCrLf + "URL of Customer Page: " + ProdPartPageURL)
        Dim prodpartService As New ProdPartPage.ProdPart_Service()
        prodpartService.Url = ProdPartPageURL
        prodpartService.UseDefaultCredentials = True

        Dim fRoutingStatus As New ProdPartPage.ProdPart_Filter()
        fRoutingStatus.Field = ProdPartPage.ProdPart_Fields.Routing_Status
        fRoutingStatus.Criteria = "In Progress"

        Dim fWorkCenterNo As New ProdPartPage.ProdPart_Filter()
        fWorkCenterNo.Field = ProdPartPage.ProdPart_Fields.Work_Center_No
        fWorkCenterNo.Criteria = "04"

        Try
            Dim filters() As ProdPartPage.ProdPart_Filter = New ProdPartPage.ProdPart_Filter(1) {fRoutingStatus, fWorkCenterNo}
            Dim prodparts() As ProdPartPage.ProdPart = prodpartService.ReadMultiple(filters, Nothing, 0)

            Dim i As Integer = prodparts.Count
            For Each prodpart As ProdPartPage.ProdPart In prodparts
                System.Diagnostics.Debug.WriteLine(prodpart.Order_No)
            Next
        Catch ex As Exception
            Dim err As String = ex.ToString
        End Try

The Integer i always gives me value 0. While there should be some rows according to the data in Navision. Also with empty Criteria i don't get any rows.
Is there a problem with the code, with database conversion or with the published webservice?
I already tried to compile everything multiple times, its weird there are no other pages; so i can't start the RTC, but the page should transport data to the WS?

Thanks
Sign In or Register to comment.