{"title":"Codeunit 8004 Post Sub. Contract Renewal, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/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":8004,"name":"Post Sub. Contract Renewal","app":"Subscription Billing","url":"https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/8004-post-sub-contract-renewal/source/","path":"src/Apps/W1/Subscription Billing/App/Contract Renewal/Codeunits/PostSubContractRenewal.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:8003":{"name":"Sub. Contract Renewal Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/8003-sub-contract-renewal-mgt/"},"table:18":{"name":"Customer","url":"https://jonas-paprotka.de/ref/table/18-customer/"},"table:8068":{"name":"Sales Subscription Line","url":"https://jonas-paprotka.de/ref/table/8068-sales-subscription-line/"},"table:8059":{"name":"Subscription Line","url":"https://jonas-paprotka.de/ref/table/8059-subscription-line/"},"table:8002":{"name":"Planned Subscription Line","url":"https://jonas-paprotka.de/ref/table/8002-planned-subscription-line/"},"table:8062":{"name":"Cust. Sub. Contract Line","url":"https://jonas-paprotka.de/ref/table/8062-cust-sub-contract-line/"},"table:8065":{"name":"Vend. Sub. Contract Line","url":"https://jonas-paprotka.de/ref/table/8065-vend-sub-contract-line/"},"table:37":{"name":"Sales Line","url":"https://jonas-paprotka.de/ref/table/37-sales-line/"}},"procs":[{"name":"OnRun","line":12,"kind":"trigger","steps":[[14,"call","RunCheck",1],[15,"call","Post",1]]},{"name":"RunCheck","line":18,"kind":"procedure","access":"local","params":1,"steps":[[27,"ext","codeunit",8003,"IsContractRenewal",1],[30,"ext","table",18,"CheckBlockedCustOnDocs",4],[33,"ext","table",18,"CheckBlockedCustOnDocs",4],[36,"ext","codeunit",8003,"FilterSalesLinesWithTypeServiceObject",2],[40,"ext","table",8068,"FilterOnSalesLine",1]]},{"name":"Post","line":50,"kind":"procedure","access":"local","params":1,"steps":[[55,"ext","codeunit",8003,"FilterSalesLinesWithTypeServiceObject",2],[59,"call","CreatePlannedServiceCommitments",2],[60,"call","ProcessPlannedServiceCommitment",1],[61,"call","SetQuantites",1]]},{"name":"CreatePlannedServiceCommitments","line":66,"kind":"procedure","access":"local","params":2,"steps":[[71,"ext","table",8068,"FilterOnSalesLine",1],[74,"call","InsertPlannedServiceCommitmentFromSalesServiceCommitment",3]]},{"name":"InsertPlannedServiceCommitmentFromSalesServiceCommitment","line":78,"kind":"procedure","access":"local","params":3,"steps":[[86,"event","OnBeforeInsertPlannedSubscriptionLineFromSalesSubscriptionLine",1],[99,"validate",8059,"Subscription Line Start Date"],[102,"validate",8059,"Subscription Line Start Date"],[104,"validate",8059,"Subscription Line Start Date"],[109,"ext","table",8059,"CopyFromSalesServiceCommitment",1],[110,"ext","table",8059,"CalculateSubscriptionDates",0],[111,"ext","table",8059,"SetCurrencyData",3],[112,"ext","table",8059,"SetLCYFields",1],[113,"ext","table",8059,"SetDefaultDimensions",1],[114,"ext","table",8059,"GetCombinedDimensionSetID",2],[122,"write",8002,"Insert"],[124,"event","OnAfterInsertPlannedSubscriptionLineFromSalesSubscriptionLine",0]]},{"name":"ProcessPlannedServCommsForPostedSalesInvoice","line":141,"kind":"procedure","access":"internal","params":1,"steps":[[147,"call","DropPlannedServiceCommitmentBuffer",1],[157,"call","CreatePlannedServiceCommitmentBuffer",3],[161,"call","ProcessPlannedServiceCommitmentBuffer",1]]},{"name":"ProcessPlannedServCommsForPostedSalesCreditMemo","line":164,"kind":"procedure","access":"internal","params":1,"steps":[[178,"ext","table",8062,"GetServiceCommitment",1],[179,"ext","table",8059,"ServiceCommitmentArchiveExistsForPeriodExists",3],[180,"call","CreatePlannedServiceCommitmentFromServiceCommitment",2],[181,"ext","table",8059,"UpdateServiceCommitmentFromServiceCommitmentArchive",1]]},{"name":"ProcessPlannedServCommsForPostedPurchaseInvoice","line":188,"kind":"procedure","access":"internal","params":1,"steps":[[194,"call","DropPlannedServiceCommitmentBuffer",1],[204,"call","CreatePlannedServiceCommitmentBuffer",3],[208,"call","ProcessPlannedServiceCommitmentBuffer",1]]},{"name":"ProcessPlannedServCommsForPostedPurchaseCreditMemo","line":211,"kind":"procedure","access":"internal","params":1,"steps":[[225,"ext","table",8065,"GetServiceCommitment",1],[226,"ext","table",8059,"ServiceCommitmentArchiveExistsForPeriodExists",3],[227,"call","CreatePlannedServiceCommitmentFromServiceCommitment",2],[228,"ext","table",8059,"UpdateServiceCommitmentFromServiceCommitmentArchive",1]]},{"name":"DropPlannedServiceCommitmentBuffer","line":235,"kind":"procedure","access":"local","params":1,"steps":[[239,"write",8002,"DeleteAll"]]},{"name":"CreatePlannedServiceCommitmentBuffer","line":242,"kind":"procedure","access":"local","params":3,"steps":[[247,"write",8002,"Insert"]]},{"name":"CreatePlannedServiceCommitmentFromServiceCommitment","line":251,"kind":"procedure","access":"local","params":2,"steps":[[259,"write",8002,"Insert"]]},{"name":"ProcessPlannedServiceCommitmentBuffer","line":262,"kind":"procedure","access":"local","params":1,"steps":[[270,"call","ProcessPlannedServiceCommitment",1]]},{"name":"ProcessPlannedServiceCommitment","line":278,"kind":"procedure","params":1,"steps":[[287,"event","OnBeforeProcessPlannedSubscriptionLine",1],[292,"call","CheckPerformServiceCommitmentUpdate",2],[301,"ext","table",8059,"SetLCYFields",1],[308,"event","OnBeforeUpdateSubscriptionLineFromPlannedSubscriptionLine",0],[310,"ext","table",8059,"ArchiveServiceCommitment",2],[311,"write",8059,"Modify"],[312,"write",8002,"Delete",1]]},{"name":"CheckPerformServiceCommitmentUpdate","line":316,"kind":"procedure","access":"local","params":2,"steps":[[330,"ext","table",8059,"SetPerformUpdateForContractPriceUpdate",3],[332,"event","OnCheckPerformSubscriptionLineUpdate",0]]},{"name":"SetQuantites","line":336,"kind":"procedure","access":"local","params":1,"steps":[[348,"write",37,"Modify"]]}]}