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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

OData Query in Dynamics 365 portal thowing error "Object reference not set to an instance of an object."

(0) ShareShare
ReportReport
Posted on by 5

I am trying to make the OData query in my dev portal, here I m getting the following error. I did all the setting in entity list, not sure why getting this error, I restarted the portal as well but it didn’t work, wanted to check if it is related to MS update or something else.

Apricate your help in advance.

<m:error xmlns:m="schemas.microsoft.com/.../metadata"> <m:code/> <m:message xml:lang="en-US">An error has occurred.</m:message> <m:innererror> <m:message>Object reference not set to an instance of an object.</m:message> <m:type>System.NullReferenceException</m:type> <m:stacktrace> at Adxstudio.Xrm.Web.UI.EntityList.OData.EntityListODataFeedDataAdapter.GetEntityList(IEdmModel model, String entitySetName) in S:\Framework\Adxstudio.Xrm\Web\UI\EntityList\OData\EntityListODataFeedDataAdapter.cs:line 0 at Adxstudio.Xrm.Web.UI.EntityList.OData.EntityListODataFeedDataAdapter.GetPageSize(IEdmModel model, String entitySetName) in S:\Framework\Adxstudio.Xrm\Web\UI\EntityList\OData\EntityListODataFeedDataAdapter.cs:line 183 at Site.Areas.EntityList.Controllers.ODataEntitySetController.Get() in S:\Samples\MasterPortal\Areas\EntityList\Controllers\ODataEntitySetController.cs:line 31 at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(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.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.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__2.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.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.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__1.MoveNext()</m:stacktrace> </m:innererror> </m:error>

  • LeoAlt Profile Picture
    16,341 Moderator on at

    Hi partner,

    Please check  the following points.

    1.Check if your URL is correct with the format:  https://<portalurl>/_odata/entity_set_name

    2.Check if your role has the permission to entity.

    I tried to use odata retrieve case records in portal, and it worked well.

    pastedimage1590735121265v1.png

    pastedimage1590735157000v2.png

    Best Regards,

    Leo

  • Girish Soni Profile Picture
    5 on at

    Leo thanks for the update, I tested all the checks and found it correct, It's working for my old entity set, but throwing error for new one. I created for other entities as well but it's throwing error same error.

  • LeoAlt Profile Picture
    16,341 Moderator on at

    Hi partner,

    Please check that if your portal role has the correct entity permission.

    If this issue still exists, please raise a ticket to Microsoft for more professional help.

    Regards,

    Leo

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#2
11manish Profile Picture

11manish 19 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 19

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans