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
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
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!
Hi Dasaradh kambampati,
Can you please share any updates with us. Do you need any further help/information from community?
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.
5.As last step, Go to "Workflow section" and set the Send notifications in email check box enabled
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?
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.
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
André Arnaud de Cal...
293,245
Super User 2025 Season 1
Martin Dráb
231,927
Most Valuable Professional
nmaenpaa
101,156
Moderator