{"title":"Codeunit 8023 Create Usage Data Billing","url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/","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","changedSince":"2026-09-22","source":{"feed":"https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json","package":"Microsoft.SubscriptionBilling.symbols.3099ffc7-4cf7-4df6-9b96-7e4bc2bb587c","build":"29.0.54011.55644","builds":{"26":"26.5.38752.40541","27":"27.5.46862.47359","28":"28.5.54151.54365","29":"29.0.54011.55644"},"code":{"28":{"url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/source/?v=28","repo":"https://github.com/microsoft/BCApps","branch":"releases/28.x","commit":"408a4cc8d3a4c54b60464cc14c964479facb9ba0","path":"src/Apps/W1/Subscription Billing/App/Usage Based Billing/Codeunits/CreateUsageDataBilling.Codeunit.al","license":"MIT"},"29":{"url":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/source/","repo":"https://github.com/microsoft/BCApps","branch":"releases/29.x","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","path":"src/Apps/W1/Subscription Billing/App/Usage Based Billing/Codeunits/CreateUsageDataBilling.Codeunit.al","license":"MIT"}},"note":"Presence per major, highest build of each; 17 is the oldest major on the feed. Local procedures are not listed."},"object":{"type":"codeunit","id":8023,"name":"Create Usage Data Billing","app":"Subscription Billing","appByVersion":[{"app":"Subscription Billing","from":26}],"nameByVersion":[{"name":"Create Usage Data Billing","from":26}],"namespace":"Microsoft.SubscriptionBilling","versions":"26-29","majors":[26,27,28,29],"countries":["W1","DE","US"],"minors":{"W1":"26.0-29.0","DE":"26.0-29.0","US":"26.0-29.0"},"minorsUrl":"https://jonas-paprotka.de/ref/codeunit/8023-create-usage-data-billing/editions.json","extends":null,"extendsUrl":null,"sourceTable":null,"properties":{"tableNo":"Usage Data Import"},"extendedBy":[],"implementedBy":[],"sourceFile":"Usage Based Billing/Codeunits/CreateUsageDataBilling.Codeunit.al","obsolete":null,"obsoleteSeenFrom":null,"byVersion":{"26":{"app":"Subscription Billing","name":"Create Usage Data Billing","ns":"Microsoft.SubscriptionBilling","obsolete":null,"target":"","sourceTable":"","props":{"tableNo":"Usage Data Import"},"counts":{"fields":0,"keys":0,"methods":6,"values":0},"stub":false},"27":{"app":"Subscription Billing","name":"Create Usage Data Billing","ns":"Microsoft.SubscriptionBilling","obsolete":null,"target":"","sourceTable":"","props":{"tableNo":"Usage Data Import"},"counts":{"fields":0,"keys":0,"methods":6,"values":0},"stub":false},"28":{"app":"Subscription Billing","name":"Create Usage Data Billing","ns":"Microsoft.SubscriptionBilling","obsolete":null,"target":"","sourceTable":"","props":{"tableNo":"Usage Data Import"},"counts":{"fields":0,"keys":0,"methods":5,"values":0},"stub":false},"29":{"app":"Subscription Billing","name":"Create Usage Data Billing","ns":"Microsoft.SubscriptionBilling","obsolete":null,"target":"","sourceTable":"","props":{"tableNo":"Usage Data Import"},"counts":{"fields":0,"keys":0,"methods":6,"values":0},"stub":false}},"fields":[],"keys":[],"procedures":[{"name":"CollectServiceCommitments","sig":"(var Record Subscription Line, Code[20], Date)","named":"(var TempServiceCommitment: Record \"Subscription Line\" temporary; ServiceObjectNo: Code[20]; SubscriptionEndDate: Date)","returns":"","kind":"procedure","access":"internal","obsolete":null,"range":"26-29","first":26,"last":29,"obsoleteSince":null,"spans":[{"from":26,"to":29,"named":"(var TempServiceCommitment: Record \"Subscription Line\" temporary; ServiceObjectNo: Code[20]; SubscriptionEndDate: Date)","returns":"","kind":"procedure","access":"internal","obsolete":null}]},{"name":"CreateUsageDataBillingFromTempServiceCommitments","sig":"(var Record Subscription Line, Code[20], Integer, Code[20], Date, Date, Decimal, Decimal, Decimal, Decimal, Decimal, Code[10])","named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10])","returns":"","kind":"procedure","access":"internal","obsolete":null,"range":"26","first":26,"last":26,"obsoleteSince":null,"spans":[{"from":26,"to":26,"named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10])","returns":"","kind":"procedure","access":"internal","obsolete":null}]},{"name":"GetRetryFailedUsageDataImport","sig":"()","named":"()","returns":"Boolean","kind":"procedure","access":"internal","obsolete":null,"range":"26-27","first":26,"last":27,"obsoleteSince":null,"spans":[{"from":26,"to":27,"named":"()","returns":"Boolean","kind":"procedure","access":"internal","obsolete":null}]},{"name":"CreateUsageDataBillingFromTempServiceCommitments","sig":"(var Record Subscription Line, Code[20], Integer, Code[20], Text[80], Text[100], Date, Date, Decimal, Decimal, Decimal, Decimal, Decimal, Code[10])","named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; ProductID: Text[80]; ProductName: Text[100]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10])","returns":"","kind":"procedure","access":"internal","obsolete":null,"range":"27-28","first":27,"last":28,"obsoleteSince":null,"spans":[{"from":27,"to":28,"named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataImportEntryNo: Integer; ServiceObjectNo: Code[20]; ProductID: Text[80]; ProductName: Text[100]; BillingPeriodStartDate: Date; BillingPeriodEndDate: Date; UnitCost: Decimal; NewQuantity: Decimal; CostAmount: Decimal; UnitPrice: Decimal; NewAmount: Decimal; CurrencyCode: Code[10])","returns":"","kind":"procedure","access":"internal","obsolete":null}]},{"name":"CreateUsageDataBillingFromTempServiceCommitments","sig":"(var Record Subscription Line, Code[20], Record Usage Data Generic Import)","named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataGenericImportGlobal: Record \"Usage Data Generic Import\")","returns":"","kind":"procedure","access":"internal","obsolete":null,"range":"29","first":29,"last":29,"obsoleteSince":null,"spans":[{"from":29,"to":29,"named":"(var TempServiceCommitment: Record \"Subscription Line\"; SupplierNo: Code[20]; UsageDataGenericImportGlobal: Record \"Usage Data Generic Import\")","returns":"","kind":"procedure","access":"internal","obsolete":null}]}],"events":[{"name":"OnAfterCreateUsageDataBillingFromTempSubscriptionLine","sig":"(var Record Subscription Line, var Record Usage Data Billing)","named":"(var TempSubscriptionLine: Record \"Subscription Line\"; var UsageDataBilling: Record \"Usage Data Billing\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"26-29","first":26,"last":29,"obsoleteSince":null,"spans":[{"from":26,"to":29,"named":"(var TempSubscriptionLine: Record \"Subscription Line\"; var UsageDataBilling: Record \"Usage Data Billing\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterCreateUsageDataBillingFromTempSubscriptionLines","sig":"(var Record Subscription Line)","named":"(var TempSubscriptionLine: Record \"Subscription Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"26-29","first":26,"last":29,"obsoleteSince":null,"spans":[{"from":26,"to":29,"named":"(var TempSubscriptionLine: Record \"Subscription Line\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnAfterCollectServiceCommitments","sig":"(var Record Subscription Line, Code[20], Date)","named":"(var TempSubscriptionLine: Record \"Subscription Line\" temporary; SubscriptionHeaderNo: Code[20]; SubscriptionLineEndDate: Date)","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"26-29","first":26,"last":29,"obsoleteSince":null,"spans":[{"from":26,"to":29,"named":"(var TempSubscriptionLine: Record \"Subscription Line\" temporary; SubscriptionHeaderNo: Code[20]; SubscriptionLineEndDate: Date)","returns":"","kind":"integrationevent","access":"local","obsolete":null}]},{"name":"OnBeforInsertUsageDataBilling","sig":"(var Record Usage Data Billing, Record Usage Data Generic Import)","named":"(var UsageDataBilling: Record \"Usage Data Billing\"; UsageDataGenericImportGlobal: Record \"Usage Data Generic Import\")","returns":"","kind":"integrationevent","access":"local","obsolete":null,"range":"29","first":29,"last":29,"obsoleteSince":null,"spans":[{"from":29,"to":29,"named":"(var UsageDataBilling: Record \"Usage Data Billing\"; UsageDataGenericImportGlobal: Record \"Usage Data Generic Import\")","returns":"","kind":"integrationevent","access":"local","obsolete":null}]}],"values":[],"controls":[],"actions":[]}}