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

How to check if Batch processing activated or not in x++ for sending email

(0) ShareShare
ReportReport
Posted on by 5

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++ ???

I have the same question (0)
  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    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

  • Suggested answer
    Muhammad Saad Salman Profile Picture
    29 on at

    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

  • vaibhav srivastav Profile Picture
    5 on at

    thanks resolved

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans