Announcements
I made a batch job (Sysoperation based class) for sending an email , I need a function that when batch job is activated then only mail can be sent through X++ code else not
How to code this in X++ ???
Hi Vaibhav, Please check this article, you can check in main method of controller class.
community.dynamics.com/.../quickfix-6-how-to-check-if-code-is-running-on-batch-server
Hi,
If you want to check if the code is getting executed in batch in following classes.
controller class(Class extended from SysOperationServiceController):
this.isInBatch()
Service class (Class extended from SysOperationServiceBase)
this.isExecutingInBatch()
Hope this answers your question
Thanks
thanks resolved
vaibhav srivastav Great, please Verify the answer/s that helped.
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 673 Super User 2026 Season 1
Abhilash Warrier 280 Super User 2026 Season 1
Martin Dráb 213 Most Valuable Professional