Batch Email

Get our Free Newletter

Don't you have the time to be online here at DUG every day? So how do you follow what is going on in the Dynamics industry and community?
If you subscribe to the DUG Newsletter then you can relax! We will make sure that you don't miss the big news!

Check out our
Newsletter Subscription Center
page a complete list of our different newsletters.

This post has 2 Replies | 0 Followers

Not Ranked
Posts 4
25 Points
Joined: Oct 24, 2005
Last Online:
Jul 20, 2006 9:16
Bigglesuk Posted: Oct 24, 2005 16:55
How helpful was this post/question? Please rate here:
I currently run a batch for our bar-coding (DRS). It fires off every 1 minute and processes what it needs to then finishes (or falls over if there is a problem). I would really like to be able to turn the email me option on with this so that I can find out when it has fallen over. I need to be able to change the batch email setup (for this particular job not the other batch ones) so that it only emails when it fails. Otherwise I would get spammed over 1 minute with successful completion of batches.

The other way to do this I would of though would be to have the batch server not check all the time, but to just know when something has been entered into it and fire off... I thought this was possible but may be wrong.

If the jobs sucessful you normally get:
Status 'Ended'
Started on 24/10/2005, at 04:00:11.
Finished on 24/10/2005, at 06:01:24.
Please check the infologue for more information.

New job status 'Waiting'.
Job is set to start on 25/10/2005, at 04:00:00.


(and i dont want to recieve these)

if it fails i would like to see:
Status 'Error'
Started on 19/10/2005, at 20:19:59.
Finished on 19/10/2005, at 20:20:10.
The system logged one or more errors, please check the infologue for more information.


Plus is it actually possible to attach the error infologue to the email??

any help you could give would be greatly appreciated, thanks.

Andrew
Not Ranked
Male
Posts 1
5 Points
Joined: Sep 28, 2005
Last Online:
Mar 13, 2007 11:27
Location: Belgium
WillyD replied on Nov 4, 2005 0:23
How helpful was this comment/solution? Please rate here:
Andrew,

Per batch job you have the option to get a reply by email every time the batch job has ran. This is standard Axapta.

You have to indicate your e-mail address in Human Resources > Employee > Contact Info tab, for the emplyee account that starts the batch job and make sure that the employee id is linked to the user id (Human Resources > Employee > General tab > User Id).
Otherwise the E-mail option on the Batch tab will not be enabled.

The status and jobdetails of the batch job are sent in the e-mail body (exactly as you requested)

If you do not want the e-mail to be sent for successful jobs, but only for failed one's i suggest to have a look in

\Classes\BatchRun\runJob (the sendmail method is started at the end of this method)

and \Classes\BatchRun\sendMail

You could add some statements here to get the behavior you require.

Regards

Willy




Not Ranked
Posts 4
25 Points
Joined: Oct 24, 2005
Last Online:
Jul 20, 2006 9:16
Bigglesuk replied on Nov 10, 2005 8:55
How helpful was this comment/solution? Please rate here:
ok, thanks for the pointer.

now i have to limit the email so that if it comes through on the batch group 'barcode' it only sends on error. To be honest im not much of a coder, i can look at it and understand why its doing something, ive just never made the step onto coding myself!
Page 1 of 1 (3 items) | Get this RSS feed | Bookmark and Share