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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Object reference not s...
Finance forum

Object reference not set to an instance of an object

(0) ShareShare
ReportReport
Posted on by 4

Hi All, 

In D365 F&O, we are doing extension based development. I am getting the error 'Object reference not set to an instance of an object' while opening the form. There is no compilation errors. I have done full build also. But, still no luck.

Errors are coming for some of the forms and some of the forms are working fine.

Please share your ideas regarding this issue.

Thanks,

I have the same question (0)
  • Adria Ariste Profile Picture
    User Group Leader on at

    Do you see any additional messages on the Message Center?

  • Martin Dráb Profile Picture
    240,553 Most Valuable Professional on at

    This means that some code is trying to use an object reference that doesn't point to any object. This isn't something the compiler can identify.

    Use the debugger to find out the place where the error is thrown.

  • Ali Zaidi Profile Picture
    4,657 on at

    Possible you update the visible property of some of the control. I faced the similar problem in extension. That form has multiple extension with different name in different models. when I change the visible Properties of some of control, which client did not want on screen. Similar error occurs. I revert the changes and then control the visible properties in initialized event handler of form in extension class.

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    You can definetely set visibility of controls in code.

    But if you write code in model A, and try to set visibility of control in model B, you need to add reference from model A to model B. Otherwise the code in model A can't see that control. And that's why you get the error.

  • Sukrut Parab Profile Picture
    71,741 Moderator on at

    You can not find cause of such a error without debugging . So use debugger and see from where it is originating.

  • Suggested answer
    Muthusamy Profile Picture
    4 on at

    Hi All,

    Thanks for all your valid suggestions. I have checked and everything is okay.

    Looks, some of the objects are not compiled and synchronized with DB. we have done the build model wise and synchronization and then one full build, its resolved now.

    Thanks,

  • babalalex Profile Picture
    411 on at

    Hi Muthusamy,

    I am getting the same error when I am trying to filter Vendors or Customers in Master forms.

    And this error is coming only in UAT server, not DEV server.

    I would be grateful if you can give some guidance or suggestions for this.

    Regards,

    Sudeep Mali.

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    Did you read and try the suggestions and guidance that were provided already in this discussion?

    Anyway you need to reproduce it in dev to investigate so make sure your dev has the same codebase than UAT, then copy UAT data to dev and see if you can repro it.

  • babalalex Profile Picture
    411 on at

    Nikolaos thanks for your prompt reply.

    As the scenario is occurring in UAT only, I am getting this error only when I am trying to filter vendor account or customer account column level in UAT.

    Therefore, unable to understand how to approach or resolve this issue.

    Also, how can I reporduce the same error scenario in DEV server ?

  • babalalex Profile Picture
    411 on at

    Hi Sukrut,

    In UAT I shall not see any possiblity to use debugger.

    Any other wayout?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans