Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

'Id 0 was not found in object' on Contact_Port ReadMultiple

Posted on by Microsoft Employee

Hi,

I get the following exception when attempting to read multiple contact through the webservice. I use the fliter specified below. The same filter works with the CustomerCrad and VedorCrad webservices.

At first, I was thinking that the contact webservice lacked the 'Last_Date_Modified'-field, but that is not the case, as seen in the webservice xml.

What is causing this exception?

FILTER:

<Envelope xmlns="">schemas.xmlsoap.org/.../">
    <Body>
        <ReadMultiple xmlns="urn:microsoft-dynamics-schemas/page/contact">
            <filter>
                <Field>Last_Date_Modified</Field>
                <Criteria>09 06 19..</Criteria>
            </filter>
            <bookmarkKey></bookmarkKey>
            <setSize>1000</setSize>
        </ReadMultiple>
    </Body>
</Envelope>

EXCPETION:

System.ServiceModel.FaultException: Id 0 was not found in  object!

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Contact_Port.ReadMultiple(ReadMultiple request)
   at Contact_PortClient.Contact_Port_ReadMultiple(ReadMultiple request)
   at Contact_PortClient.ReadMultiple(Contact_Filter[] filter, String bookmarkKey, Int32 setSize)

CONTACT WebService:

Contact.xml

Categories:
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    RE: 'Id 0 was not found in object' on Contact_Port ReadMultiple

    My best guess is that the date you use in the filter is not formated currectly - have you tried a yyyymmdd format for the date?

  • Dheebekha Profile Picture
    Dheebekha 12 on at
    RE: 'Id 0 was not found in object' on Contact_Port ReadMultiple

    This is because the webservice is updated and you are not using the latest updated webservice. If you are accessing data trough the dll generated from the webservice, generate a new dll with the updated webservice and try again to fetch the data,

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: 'Id 0 was not found in object' on Contact_Port ReadMultiple

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans