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

The best approach to capture the error log in custom batch job batch

(1) ShareShare
ReportReport
Posted on by 346
Hi team,
 
I am going to developed a custom batch job with SOF. Which read a file , contained around 2000 data. 
 
I like to continue to the job still if I got any corrupt data . I don't want to stop the batch. Like to see and analysis later the failure data .
 
So, I think to create a  custom log table and use try and catch.
 
In catch scope, I like to call the log table and inserted failure record. If any.
 
Is it good approach?
 
Pls advise. thanks!
Categories:
I have the same question (0)
  • Suggested answer
    Subra Profile Picture
    1,326 on at
    Hi @CU10121822-0

    Either you can use infolog or using custom tables to track the error records and as you mentioned later you can review those and process the same as you need.

    I would suggested to insert all the records in the custom tables instead of the error alone, you can create an additional fields(Error, Success) using that you can identify whether the records has been processed suceesfully or not.

    Using this approach you will have track like how many records has been processed with an failure or suceess and with infolog you have to check the batch hisotry for each run.

    Kindly let me know if you need any additional information.
     
    Thanks,
    Subra

    If this helped, please mark it as "Verified" for others facing the same issue
  • CU10121822-0 Profile Picture
    346 on at
    Thanks Subra, yeah it will fine if in the custom table itself if i create a field like status to update "succeed" or "error". So, that I will get later the count of error records. Any how we have to do the same with try and catch scope.
     
    Apart from this, is there any other way in stnd. functionality to get the log of batch file?
     
    Pls advise. thanks!

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 477 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

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

#3
Subra Profile Picture

Subra 412

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans