{"title":"Codeunit 98 Purchase Post via Job Queue, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/98-purchase-post-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":98,"name":"Purchase Post via Job Queue","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/98-purchase-post-via-job-queue/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/98-purchase-post-via-job-queue/source/","path":"src/Layers/W1/BaseApp/Purchases/Posting/PurchasePostviaJobQueue.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:1380":{"name":"Batch Processing Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1380-batch-processing-mgt/"},"codeunit:90":{"name":"Purch.-Post","url":"https://jonas-paprotka.de/ref/codeunit/90-purch-post/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"codeunit:1373":{"name":"Batch Posting Print Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1373-batch-posting-print-mgt/"},"codeunit:415":{"name":"Release Purchase Document","url":"https://jonas-paprotka.de/ref/codeunit/415-release-purchase-document/"},"codeunit:453":{"name":"Job Queue - Enqueue","url":"https://jonas-paprotka.de/ref/codeunit/453-job-queue-enqueue/"},"table:472":{"name":"Job Queue Entry","url":"https://jonas-paprotka.de/ref/table/472-job-queue-entry/"},"table:471":{"name":"Job Queue Category","url":"https://jonas-paprotka.de/ref/table/471-job-queue-category/"}},"procs":[{"name":"OnRun","line":16,"kind":"trigger","steps":[[31,"ext","codeunit",1380,"GetBatchFromSession",2],[34,"call","SetJobQueueStatus",3],[35,"run","codeunit",90],[36,"call","SetJobQueueStatus",3],[38,"event","OnBeforeBatchProcessingErrorReset",1],[40,"ext","codeunit",1380,"ResetBatchID",0],[44,"ext","table",38,"UpdatePurchaseOrderLineIfExist",0],[47,"ext","codeunit",1373,"PrintPurchaseDocument",1],[49,"call","AreOtherJobQueueEntriesScheduled",1],[50,"ext","codeunit",1380,"ResetBatchID",0],[51,"ext","codeunit",1380,"DeleteBatchProcessingSessionMapForRecordId",1],[52,"call","SetJobQueueStatus",3]]},{"name":"SetJobQueueStatus","line":66,"kind":"procedure","access":"local","params":3,"steps":[[68,"event","OnBeforeSetJobQueueStatus",0],[72,"write",38,"Modify"]]},{"name":"EnqueuePurchDoc","line":77,"kind":"procedure","params":1,"steps":[[79,"call","EnqueuePurchDocWithUI",2]]},{"name":"EnqueuePurchDocWithUI","line":82,"kind":"procedure","params":2,"steps":[[89,"event","OnBeforeEnqueuePurchDoc",0],[98,"event","OnBeforeReleasePurchDoc",0],[100,"run","codeunit",415],[105,"call","EnqueueJobEntry",1],[106,"write",38,"Modify"]]},{"name":"EnqueueJobEntry","line":113,"kind":"procedure","access":"local","params":1,"steps":[[121,"call","FillJobEntryFromPurchSetup",1],[122,"call","FillJobEntryPurchDescription",2],[124,"event","OnEnqueueJobEntryOnBeforeRunJobQueueEnqueue",0],[125,"run","codeunit",453]]},{"name":"FillJobEntryFromPurchSetup","line":129,"kind":"procedure","access":"local","params":1,"steps":[[135,"call","GetJobQueueCategoryCode",0]]},{"name":"CancelQueueEntry","line":148,"kind":"procedure","params":1,"steps":[[151,"call","DeleteJobs",1],[153,"write",38,"Modify"]]},{"name":"DeleteJobs","line":157,"kind":"procedure","access":"local","params":1,"steps":[[165,"write",472,"DeleteAll",1]]},{"name":"AreOtherJobQueueEntriesScheduled","line":168,"kind":"procedure","access":"local","params":1,"steps":[[173,"call","GetJobQueueCategoryCode",0]]},{"name":"GetJobQueueCategoryCode","line":186,"kind":"procedure","access":"local","params":0,"steps":[[195,"ext","table",471,"InsertRec",2]]}]}