web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

System.Web.OData.Formatter.Serialization.ODataPrimitiveSerializer cannot write an object of type 'Microsoft.Dynamics.DataEntities.NoYes'.

(0) ShareShare
ReportReport
Posted on by 417

Hi,

Below OData endpoint in UAT worked fine until last Friday. After Microsoft updated the environment to latest 10.0.24 it is not working. please advise, 

https://xxxxx.sandbox.operations.dynamics.com/data/CustomersV3?$filter=CustomerAccount%20eq%20%2716860%27

Below is the error. 

<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>
System.Web.OData.Formatter.Serialization.ODataPrimitiveSerializer cannot write an object of type 'Microsoft.Dynamics.DataEntities.NoYes'.
</ExceptionMessage>
<ExceptionType>System.InvalidOperationException</ExceptionType>
<StackTrace>
at System.Web.OData.Formatter.Serialization.ODataPrimitiveSerializer.CreateODataValue(Object graph, IEdmTypeReference expectedType, ODataSerializerContext writeContext) at System.Web.OData.Formatter.Serialization.ODataEdmTypeSerializer.CreateProperty(Object graph, IEdmTypeReference expectedType, String elementName, ODataSerializerContext writeContext) at System.Web.OData.Formatter.Serialization.ODataEntityTypeSerializer.CreateStructuralProperty(IEdmStructuralProperty structuralProperty, EntityInstanceContext entityInstanceContext) at System.Web.OData.Formatter.Serialization.ODataEntityTypeSerializer.CreateStructuralPropertyBag(IEnumerable`1 structuralProperties, EntityInstanceContext entityInstanceContext) at System.Web.OData.Formatter.Serialization.ODataEntityTypeSerializer.CreateEntry(SelectExpandNode selectExpandNode, EntityInstanceContext entityInstanceContext) at System.Web.OData.Formatter.Serialization.ODataEntityTypeSerializer.WriteEntry(Object graph, ODataWriter writer, ODataSerializerContext writeContext) at System.Web.OData.Formatter.Serialization.ODataFeedSerializer.WriteFeed(IEnumerable enumerable, IEdmTypeReference feedType, ODataWriter writer, ODataSerializerContext writeContext) at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content, HttpContentHeaders contentHeaders) at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Owin.HttpMessageHandlerAdapter.<BufferResponseContentAsync>d__13.MoveNext()
</StackTrace>
</Error>

IN Prod it is working. (it is running older version)

https://yyyy.operations.dynamics.com/data/CustomersV3?$filter=CustomerAccount%20eq%20%2716860%27

{

  "@odata.context":""value":[">yyyy.operations.dynamics.com/.../$metadata

    {

      "@odata.etag":"<data>"

    }

  ]

}

Regards,

Manivannan

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,119 Super User 2025 Season 2 on at

    Hi Manivannan,

    If the entity has no customizations and nothing else was updated apart from the application update to 10.0.24, I would suggest to log an incident for Microsoft Support.

    Have you also tried to use this OData call without the filter on the customer account number?

  • vannamani77 Profile Picture
    417 on at

    There is no customization involved. I tried without filter also. Same error. I posted an Incident to Microsoft Support.

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    I got the same issue in my environment so it seems to be a bug with Customer V3 entity after Pu24 upgrade. May be a field is not configured correctly with Enum type. Please keep us posted with the MS reply, thank you.

    Regards,

  • vannamani77 Profile Picture
    417 on at

    Microsoft reported that it is a bug and PG team is working on it.

  • Sven Peeters Itineris Profile Picture
    40 on at

    So here on all our PU48 environments, it's crazy that MS did not see this issue during testing.

    Nothing on LCS just yet (no mention nor hotfix)

    Keep us updated please ...

  • Joymm Profile Picture
    on at

    Issue has published to LCS, PU49 will contain this fix, and PU48 will have quality update.

  • Suggested answer
    Luiz Sampaio Profile Picture
    5 on at

    This still seems to be a problem in July 2022. However, using the "CustomerV2" instead of V3 seems to work just fine.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans