Notifications
Announcements
No record found.
I need to send logs to AppInsight for batch job execution details. I tried to add my custom code in insert method of BatchJobHistoyTable, but it's never get executed. Because records created though set based operation. ProcessedFinishedJobs method in BatchProcessFinishJobs class creating records in BatchJobHistory table and this class is internal, all method in this class are private. Please help me where I can add my custom code so that when batch job execution is completed , I can send those details to AppInsight.
If it's about Dynamics AX, please tell us which version you're using. If it's about F&O, let me move this thread to the right forum.
Hi Martin,
Yes it's about Dynamics 365 F&O and the application version is 10.0.30
Platform release - PU54 (7.0.6592.89). It would be helpful if you move this thread to respective forum.
Thank you !!
Moved to Dynamics 365 Finance Forum. The category changed to Development / Customization / SDK.
I think you should focus on BatchRun class.
For example, what about subscribing to processFinishedJobsSendAlertsDelegate? It's what the system itself does to send alerts.
Thanks for your replies and suggestions.
processFinishedJobsSendAlertsDelegate method of BatchRun class , always has null value for BatchHistory and BatchJobHistory buffer. I need this table buffer with values.
Note that history is not logged in all cases. For example, no history is logged if the job succeeded and its LogLevel isn't set to Always.
If you're interested only in situations when history was logged, simply skip your logic if no history is available.
If you want to log information about all batches, even if they don't write anything to history, using the BatchHistory and BatchJobHistory tables doesn't meet your actual requirements.
If you want to know what exactly happens in your case, debug code in BatchRun::serverProcessFinishedJobs().
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 692 Most Valuable Professional
André Arnaud de Cal... 558 Super User 2025 Season 2
Sohaib Cheema 364 User Group Leader