Hi, I am subscribing an event of codeunit 449 - Job Queue Start Codeunit. But I am not getting my required result. for example inset a record in custom table.
Here is my code
The job queue runs in the background, so you will not get any message pop-up.
If you want to capture the error log, you need to subscribe to the right event.
Check codeunit 450 "Job Queue Error Handler".
I have tried onAfterInsert and OnAfterValidate, onAfterModify but seems these triggers are not getting any hit.
Just tried onBeforMarkAsError, but nothing happened
The event that you have mentioned in example code will run after a JobQueue is started. I do not know your exact requirements but I think you need to subscribe an event when an entry is created in Job Queue Log Entry table. If that is the case then use event like OnAfterInsert or there are many other events available for Job Queue Log Entry table. One potential event that you can use is OnBeforeMarkAsError.
Hopefully this will help you.
Regards,
Bilal Haider
Inserting record in a custom table was just an example, this can be anything, for example generating emails etc.
So I want to generate an email or create custom logs whenever a job goes to error. Can I use the event which I mentioned? or is there any other way?
Hi Danyal,
What do you mean by insert a record in custom table? and what is its relation to Job Queue Start codeunit's event OnAfterRun.
Please add more detail to it.
Regards,
Bilal Haider
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156