{"title":"Codeunit 3998 Retention Policy Scheduler, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/3998-retention-policy-scheduler/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":3998,"name":"Retention Policy Scheduler","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/3998-retention-policy-scheduler/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/3998-retention-policy-scheduler/source/","path":"src/Layers/W1/BaseApp/System/RetentionPolicy/RetentionPolicyScheduler.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:3902":{"name":"Retention Policy Setup","url":"https://jonas-paprotka.de/ref/codeunit/3902-retention-policy-setup/"},"table:472":{"name":"Job Queue Entry","url":"https://jonas-paprotka.de/ref/table/472-job-queue-entry/"},"codeunit:3908":{"name":"Retention Policy Log","url":"https://jonas-paprotka.de/ref/codeunit/3908-retention-policy-log/"},"table:471":{"name":"Job Queue Category","url":"https://jonas-paprotka.de/ref/table/471-job-queue-category/"}},"procs":[{"name":"CheckRetentionPolicyScheduleOnAfterInsert","line":20,"kind":"procedure","access":"local","params":1,"steps":[[24,"call","CanScheduleJobQueueEntry",1],[27,"ext","codeunit",3902,"IsRetentionPolicyEnabled",0],[28,"call","ScheduleRecurringRetentionPolicy",0],[30,"call","UnScheduleRecurringRetentionPolicy",0]]},{"name":"CheckRetentionPolicyScheduleOnAfterModify","line":34,"kind":"procedure","access":"local","params":1,"steps":[[38,"call","CanScheduleJobQueueEntry",1],[41,"ext","codeunit",3902,"IsRetentionPolicyEnabled",0],[42,"call","ScheduleRecurringRetentionPolicy",0],[44,"call","UnScheduleRecurringRetentionPolicy",0]]},{"name":"CheckRetentionPolicyScheduleOnAfterDelete","line":48,"kind":"procedure","access":"local","params":1,"steps":[[52,"call","CanScheduleJobQueueEntry",1],[55,"ext","codeunit",3902,"IsRetentionPolicyEnabled",0],[56,"call","UnScheduleRecurringRetentionPolicy",0]]},{"name":"ScheduleRecurringRetentionPolicy","line":73,"kind":"procedure","access":"local","params":0,"steps":[[82,"ext","table",472,"FindJobQueueEntry",2],[83,"ext","table",472,"IsReadyToStart",0],[86,"ext","table",472,"SetStatus",1],[87,"ext","codeunit",3908,"LogInfo",2],[89,"call","CreateRetentionPolicyJobQueueCategory",0],[90,"call","ScheduleOffset",0],[91,"ext","table",472,"ScheduleRecurrentJobQueueEntryWithRunDateFormula",8],[99,"call","JobTimeout",0],[100,"ext","codeunit",3908,"LogInfo",2]]},{"name":"UnScheduleRecurringRetentionPolicy","line":115,"kind":"procedure","access":"local","params":0,"steps":[[120,"ext","table",472,"FindJobQueueEntry",2],[123,"ext","table",472,"SetStatus",1],[124,"ext","codeunit",3908,"LogInfo",2]]},{"name":"CreateRetentionPolicyJobQueueCategory","line":127,"kind":"procedure","access":"local","params":0,"steps":[[136,"write",471,"Insert"]]}]}