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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

What is the best way to deal with error "Object reference not set to an instance of an object" ?

(0) ShareShare
ReportReport
Posted on by 309

Hi guys,

I have a custom form which in it there is process by clicking some button. If I check with few scenario at my DevBox there is no error, but in UAT there is this error :  "Object reference not set to an instance of an object" 

pastedimage1678334096682v1.png

What is the best way to trace this kind of error ? Since there is no other message, and I can't debug it in UAT. I tried with the same scenario, same data entry, but obviously cannot 100% the exact same data for all the linking when processing the whole relation of it like master data or other configuration. 

Thanks,

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Axel, You can restore UAT Database in Dev to replicate issue or another way is to debug UAT environment from your Devbox.

    Check this article

    aristonjavier.wordpress.com/.../

    If even after Database restore, its not replicated then it might be code merge issue, so ensure that your changes are merged & deployed properly in UAT

  • Martin Dráb Profile Picture
    238,743 Most Valuable Professional on at

    If it's coming from code, the only way is avoiding the attempt to call method on nothing (null), because it makes no sense and it must fail. Maybe there shouldn't ever be null and there is a bug causing that. Or it may be null in come case and you need to check the value before using it.

    Regarding debugging, you can even configure a DEV environment to connect to the database of another (non-production) environment.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 583 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 378

#3
Diego Mancassola Profile Picture

Diego Mancassola 255

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans