{"title":"Codeunit 8006 Create Subscription Line, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/8006-create-subscription-line/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":8006,"name":"Create Subscription Line","app":"Subscription Billing","url":"https://jonas-paprotka.de/ref/codeunit/8006-create-subscription-line/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/8006-create-subscription-line/source/","path":"src/Apps/W1/Subscription Billing/App/Import/Codeunits/CreateSubscriptionLine.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":{"table:8009":{"name":"Imported Subscription Line","url":"https://jonas-paprotka.de/ref/table/8009-imported-subscription-line/"},"codeunit:8057":{"name":"Date Formula Management","url":"https://jonas-paprotka.de/ref/codeunit/8057-date-formula-management/"},"table:8059":{"name":"Subscription Line","url":"https://jonas-paprotka.de/ref/table/8059-subscription-line/"}},"procs":[{"name":"OnRun","line":7,"kind":"trigger","steps":[[10,"call","SkipRun",0],[12,"call","TestImportedServiceCommitment",0],[13,"call","CreateServiceCommitment",0]]},{"name":"SkipRun","line":18,"kind":"procedure","access":"local","params":0,"steps":[[20,"ext","table",8009,"IsContractCommentLine",0]]},{"name":"TestImportedServiceCommitment","line":26,"kind":"procedure","access":"local","params":0,"steps":[[34,"ext","codeunit",8057,"ErrorIfDateEmpty",2],[39,"ext","codeunit",8057,"ErrorIfDateFormulaEmpty",2],[40,"ext","codeunit",8057,"ErrorIfDateFormulaNegative",1],[41,"ext","codeunit",8057,"ErrorIfDateFormulaNegative",1],[42,"ext","codeunit",8057,"ErrorIfDateFormulaNegative",1],[43,"ext","codeunit",8057,"ErrorIfDateFormulaNegative",1],[45,"ext","codeunit",8057,"ErrorIfDateFormulaNegative",1],[54,"event","OnAfterTestImportedSubscriptionLine",0]]},{"name":"CreateServiceCommitment","line":57,"kind":"procedure","access":"local","params":0,"steps":[[62,"validate",8059,"Subscription Header No."],[67,"ext","table",8059,"SetSkipTestPackageCode",1],[68,"write",8059,"Insert",1],[69,"event","OnAfterSubscriptionLineInsert",0],[72,"ext","table",8009,"GetInvoicingItemNo",0],[74,"validate",8059,"Subscription Package Code"],[77,"validate",8059,"Extension Term"],[78,"validate",8059,"Notice Period"],[79,"validate",8059,"Initial Term"],[81,"validate",8059,"Subscription Line Start Date"],[82,"validate",8059,"Subscription Line End Date"],[87,"ext","table",8059,"CheckServiceDates",3],[88,"ext","table",8059,"SetCurrencyData",3],[96,"ext","table",8059,"CalculatePrice",0],[99,"validate",8059,"Discount %"],[101,"validate",8059,"Discount Amount"],[103,"validate",8059,"Amount"],[114,"ext","table",8059,"CalculateSubscriptionDates",0],[116,"ext","table",8059,"CalculateTermUntilDate",0],[118,"ext","table",8059,"SetDefaultDimensions",1],[121,"event","OnBeforeSubscriptionLineModify",0],[122,"ext","table",8059,"SetSkipArchiving",1],[123,"write",8059,"Modify",1],[131,"ext","table",8009,"ClearErrorTextAndSetProcessedFields",0]]}]}