Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Job Queue Error Notification

(1) ShareShare
ReportReport
Posted on by 173
Is there a way to get some kind of notification, like an email, when a job queue tries to run and errors?
  • gdrenteria Profile Picture
    gdrenteria 13,057 Most Valuable Professional on at
    Job Queue Error Notification
    Hi
    You could rely on telemetry and when you analyze these signals, you can send emails.
    BR
    GR
  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,186 Super User 2024 Season 2 on at
    Job Queue Error Notification
    That's good. As an aside, looks like this feature will be available out of the box in the new fall 2024 update - https://learn.microsoft.com/en-us/dynamics365/release-plan/2024wave2/smb/dynamics365-business-central/get-notified-about-issues-job-queue-background-processing
     
  • Brett F Profile Picture
    Brett F 173 on at
    Job Queue Error Notification
    Thanks all!  We were lucky enough to find that an extension we had purchased for different features includes a job queue error email alert feature and it has been great!
  • Suggested answer
    Valentin Castravet Profile Picture
    Valentin Castravet 25,186 Super User 2024 Season 2 on at
    Job Queue Error Notification
    As the other users mentioned its not possible to do out of the box, you will need to customize the system to do it, or use other tools to do it. 
     
  • Suggested answer
    Manish Sharma Profile Picture
    Manish Sharma 40 on at
    Job Queue Error Notification
    We did this for a customer in NAV & then carried it in Business Central, you can try below by creating a codeunit, hope this helps,
     
    Codeunit 50000 "Send Job Queue Staus Email"
    {
        TableNo = "Job Queue Entry";
        trigger OnRun()
        begin
            case Rec.Status of
                Rec.Status::Error:
                    begin                   
                            Clear(EmailMessage);
                            Clear(Email);
                            ToRecipients := 'xyz@abcmail.com';
                            EmailSubject := 'Error in Job Queue - ' + format(Rec."Object ID to Run");
                            EmailBody := GetErrorDescp(Rec.ID);
                            EmailMessage.Create(ToRecipients, EmailSubject, EmailBody, true, CCRecipients, BCCRecipients);
                            Email.send(EmailMessage);                   
                    end;
            end;
        end;
     
        var
            EmailSubject: Text;
            EmailBody: Text;
            EmailMessage: Codeunit "Email Message";
            CCRecipients: List of [Text];
            ToRecipients: List of [Text];
            BCCRecipients: List of [Text];
            Email: Codeunit Email;
     
    local procedure GetErrorDescp(JobId: Code[250]): Text
        var
            JobQueueLogEntry: Record "Job Queue Log Entry";
        begin
            JobQueueLogEntry.Reset;
            JobQueueLogEntry.SetRange(JobQueueLogEntry.ID, JobId);
            if JobQueueLogEntry.FindLast then
                exit(JobQueueLogEntry."Error Message");
        end;
    }
  • Leslie C Profile Picture
    Leslie C 24 on at
    Job Queue Error Notification
    I was able to set this up with Power BI. I created a Power BI report with a card that monitors the errors. I then set an alert on this card that if an error occurs, I get an email. No code needed, just Power BI.
  • Suggested answer
    Sabina Sasu Profile Picture
    Sabina Sasu 19 on at
    Job Queue Error Notification
    Hi Brett,
    Unfortunately there are no out-of-the-box features that allow those actions.
    However, you can navigate to the Extensions Marketplace and download a free extension called LIDD Job Queue Alerts.
     
    We developed this extension for customers that had the same requirements as you. 
    It allows you to send email notifications when a job queue fails, and to restart it automatically.
     
    Let me know if you have any questions!
     
     
    Sabina
    Software Developer
    LIDD Consultants Inc.
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,848 Super User 2024 Season 2 on at
    Job Queue Error Notification
    Hi, as far as I know, it can't be done in the standard.
    You can use AL to customize an extension to let the system automatically send emails.
    Or you can use Power Automate to send a message when an error detail is created.
     
    Hope this can give you some hints.
    Thanks.
    ZHU

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans