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

Batch job error in Tier 2 environment - Object reference not set to an instance of object

(1) ShareShare
ReportReport
Posted on by 41
Hello All,
 
There is a process with 2 parameters 
Parameter 1 - System Administrator -> users -> Groups
Parameter 2 - System Administrator -> users -> User groups
 
The process is to update the list of members in User groups (Azure Active directory security group) to update in D365 Groups. I am using Runbasebatch.
 
Tire 2 environment:
Without batch (run manually) - This process  works as expected.
With batch (Batch processing) - This process gives 'Object reference not set to an instance of object' error and batch ends in error. 
 
 
For some reason (Your client IP address does not have access to the server) I could not connect Tier 2 database to Tier 1 and debug. Below is the screenshot.
 
 
Is there any other way, I can identify which part of the code throws the error, call stack of batch error from Tier 2 environment. Please let me know suggestions, how to find the root cause of batch error in tier 2.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Jonas "Jones" Melgaard Profile Picture
    5,016 Most Valuable Professional on at
    I moved your question to the Finance forum from Fastback, since this refers to a D365 FinOps environment classifications and the RunBaseBatch class.
     
    My best guess is that you have some issue in the pack/unpack classes; You can verify it by taking a trace and examine it using the Trace Parser tool.
  • Martin Dráb Profile Picture
    239,632 Most Valuable Professional on at
    This is a generic error; you need to find where it's thrown to learn more. Debugging is a good option; you could also get the stack trace from logs.
     
    Your client IP address does not have access to the server means that you haven't enabled access to the environment. You need to go to LCS and enable access for IP address of the computer from which you want to connect.
  • Suggested answer
    Navneeth Nagrajan Profile Picture
    2,618 Super User 2026 Season 1 on at
    Hi,
     
    For the second screen clip, your development machine doesn't have access to the database that you are trying to use to debug code. Also, once you are successful in connecting to your database ensure that you add both the iisexpress.exe/inetmgr.exe process alongwith the batch.exe process to debug batch related code. 
     
    To add to what Martin said, here is a screen clip for your reference. You need to enable client IP address in your LCS environment landing page of the database you are trying to connect to. For example, if you are trying to connect to the UAT database then you need to enable your development machine IP address in the UAT environment landing page. 
     
     
    References:
     
    Hope this helps.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 804

#2
André Arnaud de Calavon Profile Picture

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

#3
Subra Profile Picture

Subra 528

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans