Job queue failure email notification
FMC
Member Posts: 12
Hi,
I have NAV 2017 and want to create an email if a job in the job queue fails.
is there a workflow for this or what will be the best way to achieve this
Thanks
FC
I have NAV 2017 and want to create an email if a job in the job queue fails.
is there a workflow for this or what will be the best way to achieve this
Thanks
FC
0
Answers
-
You could start your codeunit from another codeunit and use the return value to determine if it was a success. Then send email from there.
Or schedule the job yourself from the run codeunit and set a error codeunit that sends the mail. (2017 only)Follow me on my blog juhl.blog0 -
thanks for the info,
Please can you help advise what the actual code will be to aciveve this
"schedule the job yourself from the run codeunit and set a error codeunit that sends the mail"
how can you start a codeunit from another code unit (not something I have done before)0 -
IF NOT Codeunit.RUN THEN
Send mail;
https://msdn.microsoft.com/en-us/dynamics-nav/createtask-functionFollow me on my blog juhl.blog0 -
thanks, I will give this a go0
-
Dont use this codeunit as another job queue because again there may a probability that this Job may stop. I too faced a situation like this and I wrote a SQL job for this.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
RockWithNAV wrote: »Dont use this codeunit as another job queue because again there may a probability that this Job may stop. I too faced a situation like this and I wrote a SQL job for this.
This makes sense,
is there anyway to achieve this in NAV witout running in a job queue0 -
Have the users watch the job que.
I usually make a pagepart in the role center for this.
Use built in NAV features not sql.
Everything can fail, even your car breaks down, does that stop you from driving it?
I will try your way, are you able to give me a little more info on how to create this0 -
thank you, I will give this a try0
-
does anyone have any examples of how to achieve Job queue failure email notification0
-
Hey,
Check this out
https://rockwithnav.wordpress.com/2016/10/03/configure-sql-email/
https://rockwithnav.wordpress.com/2016/10/03/sql-email-query/
Configure this for Job Queue failure.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Hi,
Did you try to create a codeunit/report which would look into Job Queue Entry and/or another Job Queue Log Entry log and send a notification or email when a Job Queue Entry with Status=Error is found? You would need some logic + modification of the Job Queue Entry table, or a custom table, to make sure you don't report the same error twice.
Once you have this report/codeunit working you could set it up as a separate job run every few minutes.
Also, if you are on NAV 2017, you could use Intergration events, create a subscriber function subscribing to Job Queue Entry table OnAfterModify event and send an email if a modification is made and the Status is set to Error. This solution would have the advantage that you would not have to have another job running, which someone could put into Hold.
Slawek
Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

