We are facing an issue where we would like to post all released Purchase Invoices via the Job Queue. If there is a validation error during posting of the invoice, it will skip posting and then move onto the next one.
I have built a 2 Codeunits to handle this. 1 to run on the Job Queue and the second to handle the call of Purch-Post.
The Codeunit running on the Job Queue has the following basic code:
if not MyPurchPostCall.run(PurchHeader) run then
In the MyPurchPostCall Codeunit it is a simple Purch Post call:
If the purchase invoice fails to post because my posting date is out of range or I have not filled in the vendor invoice number, the job queue moves on to the next invoice which is perfect, however if there are Dimension errors like "Select a Dimension Value Code for the Dimension Code AREA for G/L Account 63200." the job queue gets put in error state which is not what is required.
In further digging it appears to be linked to Error Message Management however I cannot see a way to deactivate this type of error handling.
We have tested this in various versions (BC17, BC20) and it happens both On Prem and in the cloud. I do have this working in a NAV2013R2 database but that version is very different to what is around now so it is not worth comparing.
Has someone come across this before and was able to get around it?