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, ...
Answered

oData not working

(3) ShareShare
ReportReport
Posted on by 11
Hello,
 
we have a problem with oData in one T2 environment. After the 10.0.42 upgrade and numerous ISV upgrades we are experiencing this error whenever any data entity is accesses via URL or office integration:
 
<Message>An error has occurred.</Message>
<ExceptionMessage>Value cannot be null. Parameter name: enumType</ExceptionMessage>
<ExceptionType>System.ArgumentNullException</ExceptionType>
<StackTrace> at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.BuildEnum(Type enumType) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.AddEntityProperty(IFieldMetadata fieldMetadata, EntityType entityType, EdmPrimitiveTypeKind edmPrimitiveType, Boolean isNullable, Boolean fetchStringMaxLength, Int32 tableId, DictDataEntity dictDataEntity) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.BuildProperty(IFieldMetadata fieldMetadata, HashSet`1 indexFields, EntityType entityType, Boolean fetchStringMaxLength, Int32 tableId, DictDataEntity dictDataEntity) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.BuildEntityTypeAndProperties(IResourceDefinition resource, IEnumerable`1 extensionResources) at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder..ctor() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.InitializeInstance() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.MetadataModelBuilder.get_Instance() at Microsoft.Dynamics.Platform.Integration.Services.OData.Metadata.EdmModelProxy.get_DirectValueAnnotationsManager() at Microsoft.OData.Edm.ExtensionMethods.SetAnnotationValue(IEdmModel model, IEdmElement element, String namespaceName, String localName, Object value) at Microsoft.OData.Edm.Csdl.SerializationExtensionMethods.SetEdmxVersion(IEdmModel model, Version version) at System.Web.OData.MetadataController.GetModel() at System.Web.OData.MetadataController.GetServiceDocument() at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, 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__17`1.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.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.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.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__17`1.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.Controllers.ActionFilterResult.<ExecuteAsync>d__5.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.Tracing.Tracers.HttpControllerTracer.<ExecuteAsyncCore>d__10.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.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__17`1.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.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()</StackTrace>
</Error>
 
 
We have an open Microsoft ticket, but they are not really helpful.
 
To me looks like there is an issue with the definition of at least one data entity where the specified enumType is missing. We have deployed a package created through devops with a build machine. The code
compiles (all models) on our dev box with no errors. 
 
Any ideas ?
Categories:
I have the same question (0)
  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,686 Super User 2025 Season 2 on at

    Hi,

    Have you refreshed the entity list after the upgrade?
    Is the DMF connection up and running?

    If yes, can you try exporting a DMF job to Excel to verify if the issue persists?

  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,438 Super User 2025 Season 2 on at
    Hi,
     
    For data entities in V10.0.42, there are a few suggestions:
    - Do a database synchronization and check if there are any errors on FinTag references. A few FinTag references are causing data entities to break.
    - Also, the error message states that you will need a full compile which means a full build and a database synchronization is required.
     
    A few questions:
    1. Can you provide the data entities list where you are facing such issues?
    2. Which enumtype is it erroring on? Need the enumtype name to provide more insights.
     
     
     
  • Layan Jwei Profile Picture
    8,118 Super User 2025 Season 2 on at
    Hi,
     
    Are you calling a standard entity or a custom one?
     
    Can you please provide us with the url you are calling and with the body if it's a POST
     
    Also are u sure it only happens in T2? So if u call the exact same url in T1, does it work?
  • Suggested answer
    Anthony Blake Profile Picture
    2,963 Super User 2025 Season 2 on at
     
    If OData is missing Enum definitions, it does sound like it could be a refresh issue. There is the potential that one or more of your numerous ISV updates for 10.0.42 could contain an issue, but for now run a Data Entity refresh from the Data Management workspace.
     
     
    It refreshes Metadata, so if there are new or modified Enums this may be required.
     
     
    If it doesn't work, you may need to start rolling back some of your ISV updates to find the culprit. Unique labels on Data Entities is often overlooked.
     
     
    Failing that, send your OData request as mentioned by other users and we can help further.
     
    Anthony
  • Verified answer
    Frank Bruemmer Profile Picture
    354 on at
    Please check your data entities and make sure all enum types are specified and exist :
     
    <Message>An error has occurred.</Message>
    <ExceptionMessage>Value cannot be null. Parameter name: enumType</ExceptionMessage>
    <ExceptionType>System.ArgumentNullException</ExceptionType>
  • Anthony Blake Profile Picture
    2,963 Super User 2025 Season 2 on at
    Hi Frank,
     
    Surely that would be picked up at compile-time? 
     
    Anthony

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 420 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 241 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans