Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamics 365 CRM: Error while saving a form when Multiselect Option Set has Values selected

(0) ShareShare
ReportReport
Posted on by 35

Hi,

I have a CRM custom entity and on the form I have added a Multiselect Option Set. When I select a value in Multiselect option set and save I get following error.

Multiselect has 2 simple values Option 1, Option 2.

pastedimage1603257926127v1.png

Error

An error occurred while validating input parameters: Microsoft.OData.ODataException: An unexpected 'StartArray' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.
at Microsoft.OData.Json.JsonReaderExtensions.ValidateNodeType(IJsonReader jsonReader, JsonNodeType expectedNodeType)
at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadPrimitiveValue(Boolean insideJsonObjectValue, IEdmPrimitiveTypeReference expectedValueTypeReference, Boolean validateNullValue, String propertyName)
at Microsoft.OData.JsonLight.ODataJsonLightPropertyAndValueDeserializer.ReadNonEntityValueImplementation(String payloadTypeName, IEdmTypeReference expectedTypeReference, PropertyAndAnnotationCollector propertyAndAnnotationCollector, CollectionWithoutExpectedTypeValidator collectionValidator, Boolean validateNullValue, Boolean isTopLevelPropertyValue, Boolean insideComplexValue, String propertyName, Nullable`1 isDynamicProperty)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadEntryDataProperty(IODataJsonLightReaderResourceState resourceState, IEdmProperty edmProperty, String propertyTypeName)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadPropertyWithValue(IODataJsonLightReaderResourceState resourceState, String propertyName)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.<>c__DisplayClass4_0.<ReadResourceContent>b__0(PropertyParsingResult propertyParsingResult, String propertyName)
at Microsoft.OData.JsonLight.ODataJsonLightDeserializer.ProcessProperty(PropertyAndAnnotationCollector propertyAndAnnotationCollector, Func`2 readPropertyAnnotationValue, Action`2 handleProperty)
at Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadResourceContent(IODataJsonLightReaderResourceState resourceState)
at Microsoft.OData.JsonLight.ODataJsonLightReader.ReadAtNestedResourceInfoEndImplementationSynchronously()
at Microsoft.OData.ODataReaderCore.ReadImplementation()
at Microsoft.OData.ODataReaderCore.InterceptException[T](Func`1 action)
at System.Web.OData.Formatter.Deserialization.ODataReaderExtensions.ReadResourceOrResourceSet(ODataReader reader)
at System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.Read(ODataMessageReader messageReader, Type type, ODataDeserializerContext readContext)
at System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type, Stream readStream, HttpContent content, IFormatterLogger formatterLogger)

  • JFL Profile Picture
    JFL 5 on at
    RE: Dynamics 365 CRM: Error while saving a form when Multiselect Option Set has Values selected

    We are having the same problem. It worked for a while then stopped for no apparent reason.

    I got fixed somehow, for months, and now same issue again. No changes.

    Very strange and annoying ;) We cannot simply recreate the field every time.

  • Mian Ahsan Profile Picture
    Mian Ahsan 35 on at
    RE: Dynamics 365 CRM: Error while saving a form when Multiselect Option Set has Values selected

    Thanks for your reply, Efrain.

    It is Microsoft Dynamics 365 Version 1612 (9.0.17.8) (DB 9.0.17.8) on-premises.

    There is custom code on the form but none which has any impact on the Multiselect Option Set.

    No, I have not tried anything like fiddler.

    Infact this worked previously on the same form, but then I have to delete the field and recreate it. Since then I am facing this issue.

  • edmunch Profile Picture
    edmunch on at
    RE: Dynamics 365 CRM: Error while saving a form when Multiselect Option Set has Values selected

    Have you tried looking at the request using something like Fiddler or used Dev tools?  If so, did you notice anything with the format of the request? Do you have any custom code on the form?  What build of D365 is this?

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans