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 alerts

(0) ShareShare
ReportReport
Posted on by 40

Hello,

   I',m  running a batch job, and i user wants to get this batch log to his email ID. Any ideas how to do this through code. Thank you

  • tris3s10 Profile Picture
    on at
    RE: Batch job alerts

    Hi Junaid,

    Does D365 F&O allow admins to set up alerts when batch jobs fail or unsuccessful? or does it only show successful? Just curious what the output what be when a batch job fails. Or would the admin need to create a logic in logs to create that alert? Any info would be helpful. Thanks!  

  • Junaid Idrees Profile Picture
    on at
    RE: Batch job alerts

    Hi Dasaradh kambampati,

    Can you please share any updates with us. Do you need any further help/information from community?

  • Suggested answer
    Junaid Idrees Profile Picture
    on at
    RE: Batch job alerts

    Hi Dasaradh kambampati,

    Can you please try thefollowing:

    1.Delete your user ID from system. 

    2. Reimport your user ID 

    3. Go to "User options" Then go to Account section and select SMTP/Exchange in the "Email provider ID"

    4. Put your email in 'Sender email' field and make sure the same as showing in 'Alias' field.

    02021.PNG

    5.As last step, Go to "Workflow section" and set the Send notifications in email check box enabled

    820438.png

  • Dasaradh kambampati Profile Picture
    40 on at
    RE: Batch job alerts

    HI Junaid,

      I have already checked the email box, but it is still not sending me any notification once the job is done. User also wanted to get the log on his email. Any way i can achieve this?

    pastedimage1603468715747v1.png

  • Suggested answer
    Junaid Idrees Profile Picture
    on at
    RE: Batch job alerts

    Hi Dasaradh kambampati ,

    You can check if you can setup standard alerts on log because alert option can send email to the user directly OR you ou can write a batch class to check batch logs from "batch job history" and send an email to respective users you want.

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at
    RE: Batch job alerts

    Hi Dasardah,

    Do you want to send the user an email if the batch job failed only or in any case?

    For the latter one what do you want to do if there is no log?

    Also, standard D365FO ships with a functionality to send out alerts when a batch job completed. The only thing missing would be to add the log (if available).

    Yet, doing that can quickly get tricky especially if the log is large.

    Can't you simply make use of the standard notification function and ask the user to check the log directly in D365FO in case of an error?

    I don't see the value added by making a code adjustment for this.

    Best regards,

    Ludwig

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans