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, ...
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
    4,986 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
    237,965 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,438 Super User 2025 Season 2 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

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
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans