Skip to main content

Notifications

Small and medium business | Business Central, N...
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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans