{"title":"Codeunit 95 Purch Post Batch via Job Queue, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/95-purch-post-batch-via-job-queue/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":95,"name":"Purch Post Batch via Job Queue","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/95-purch-post-batch-via-job-queue/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/95-purch-post-batch-via-job-queue/source/","path":"src/Layers/W1/BaseApp/Purchases/Posting/PurchPostBatchViaJobQueue.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:90":{"name":"Purch.-Post","url":"https://jonas-paprotka.de/ref/codeunit/90-purch-post/"},"codeunit:28":{"name":"Error Message Management","url":"https://jonas-paprotka.de/ref/codeunit/28-error-message-management/"},"codeunit:453":{"name":"Job Queue - Enqueue","url":"https://jonas-paprotka.de/ref/codeunit/453-job-queue-enqueue/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"table:471":{"name":"Job Queue Category","url":"https://jonas-paprotka.de/ref/table/471-job-queue-category/"},"table:477":{"name":"Report Inbox","url":"https://jonas-paprotka.de/ref/table/477-report-inbox/"}},"procs":[{"name":"OnRun","line":19,"kind":"trigger","steps":[[21,"call","PostPurchaseBatch",1]]},{"name":"PostPurchaseBatch","line":33,"kind":"procedure","access":"local","params":1,"steps":[[50,"call","SetJobQueueStatus",2],[51,"run","codeunit",90],[52,"call","SetJobQueueStatus",2],[53,"ext","codeunit",28,"LogLastError",0],[56,"call","SetJobQueueStatus",2],[59,"call","PrintPurchaseDocument",2],[66,"call","ThrowErrorMessage",3]]},{"name":"EnqueuePurchaseBatch","line":69,"kind":"procedure","params":2,"steps":[[71,"call","EnqueueJobQueueEntry",1]]},{"name":"EnqueueJobQueueEntry","line":74,"kind":"procedure","access":"local","params":1,"steps":[[83,"call","GetJobQueueCategoryCode",0],[84,"call","GetDescription",0],[86,"run","codeunit",453]]},{"name":"SetJobQueueStatus","line":89,"kind":"procedure","access":"local","params":2,"steps":[[94,"write",38,"Modify"]]},{"name":"GetJobQueueCategoryCode","line":99,"kind":"procedure","access":"local","params":0,"steps":[[108,"ext","table",471,"InsertRec",2]]},{"name":"PrintPurchaseDocument","line":124,"kind":"procedure","access":"local","params":2,"steps":[[130,"call","PrintReceiptDocument",2],[132,"call","PrintInvoiceDocument",2],[135,"call","PrintInvoiceDocument",2],[137,"call","PrintCrMemoDocument",2]]},{"name":"PrintReceiptDocument","line":141,"kind":"procedure","access":"local","params":2,"steps":[[149,"call","PrintDocument",4]]},{"name":"PrintInvoiceDocument","line":152,"kind":"procedure","access":"local","params":2,"steps":[[164,"call","PrintDocument",4],[166,"call","PrintDocument",4]]},{"name":"PrintCrMemoDocument","line":169,"kind":"procedure","access":"local","params":2,"steps":[[180,"call","PrintDocument",4]]},{"name":"PrintDocument","line":183,"kind":"procedure","access":"local","params":4,"steps":[[193,"call","CheckReportId",1],[194,"call","PrintToPDF",4],[195,"ext","codeunit",28,"LogLastError",0],[199,"ext","codeunit",28,"LogLastError",0]]},{"name":"PrintToPDF","line":207,"kind":"procedure","access":"local","params":4,"steps":[[222,"event","OnPrintToPDFOnBeforeReportRun",1],[228,"write",477,"Insert",1],[229,"event","OnPrintToPDFOnAfterReportInboxInsert",0]]}]}