{"title":"Codeunit 8023 Create Usage Data Billing, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/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-10","object":{"type":"codeunit","id":8023,"name":"Create Usage Data Billing","app":"Subscription Billing","url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/source/","path":"src/Apps/W1/Subscription Billing/App/Usage Based Billing/Codeunits/CreateUsageDataBilling.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:8013":{"name":"Usage Data Import","url":"https://jonas-paprotka.de/ref/table/8013-usage-data-import/"},"table:8018":{"name":"Usage Data Generic Import","url":"https://jonas-paprotka.de/ref/table/8018-usage-data-generic-import/"},"table:8006":{"name":"Usage Data Billing","url":"https://jonas-paprotka.de/ref/table/8006-usage-data-billing/"},"table:8059":{"name":"Subscription Line","url":"https://jonas-paprotka.de/ref/table/8059-subscription-line/"}},"procs":[{"name":"OnRun","line":10,"kind":"trigger","steps":[[13,"call","Code",0]]},{"name":"Code","line":17,"kind":"procedure","access":"local","params":0,"steps":[[26,"call","ValidateImportedData",0],[28,"call","CreateUsageDataBillingFromImport",0],[30,"ext","table",8013,"UpdateProcessingStatus",0]]},{"name":"CollectServiceCommitments","line":39,"kind":"procedure","access":"internal","params":3,"steps":[[41,"call","FillTempServiceCommitment",3],[42,"event","OnAfterCollectServiceCommitments",0]]},{"name":"CreateUsageDataBillingFromTempServiceCommitments","line":45,"kind":"procedure","access":"internal","params":3,"steps":[[48,"call","CreateUsageDataBillingFromTempServiceCommitment",3],[50,"event","OnAfterCreateUsageDataBillingFromTempSubscriptionLines",0]]},{"name":"CreateUsageDataBillingFromTempServiceCommitment","line":53,"kind":"procedure","access":"local","params":3,"steps":[[60,"ext","table",8018,"GetCurrencyCode",0],[62,"ext","table",8006,"InitFrom",7],[82,"ext","table",8006,"AlignContractCurrency",2],[83,"ext","table",8006,"CalculateAmounts",6],[84,"ext","table",8006,"UpdateRebilling",0],[87,"event","OnBeforInsertUsageDataBilling",0],[89,"write",8006,"Insert",1],[90,"ext","table",8006,"InsertMetadata",0],[92,"event","OnAfterCreateUsageDataBillingFromTempSubscriptionLine",0]]},{"name":"FillTempServiceCommitment","line":96,"kind":"procedure","access":"local","params":3,"steps":[[101,"write",8059,"DeleteAll"],[109,"write",8059,"Insert"]]}]}