From 73b6abbcfcba14b408b67b61a1e759569fc3b385 Mon Sep 17 00:00:00 2001 From: Danial Sarfraz Date: Mon, 16 Feb 2026 18:39:09 +0100 Subject: [PATCH 1/4] Fix billing line deletion if subscription line does not exist --- .../App/Billing/Tables/BillingLine.Table.al | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al index 9b1c84fcef..95dafb0456 100644 --- a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al +++ b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al @@ -278,7 +278,8 @@ table 8061 "Billing Line" var ServiceCommitment: Record "Subscription Line"; begin - GetServiceCommitment(ServiceCommitment); + if not GetServiceCommitment(ServiceCommitment) then + exit; OnBeforeUpdateNextBillingDateInResetSubscriptionLineNextBillingDate(ServiceCommitment); if ("Document Type" = "Document Type"::"Credit Memo") and ("Correction Document Type" <> "Rec. Billing Document Type"::None) then @@ -502,7 +503,7 @@ table 8061 "Billing Line" internal procedure GetServiceCommitment(var ServiceCommitment: Record "Subscription Line") begin - ServiceCommitment.Get("Subscription Line Entry No."); + exit(ServiceCommitment.Get("Subscription Line Entry No.")); end; local procedure UpdateNextBillingDateFromUsageDataMetadata(var ServiceCommitment: Record "Subscription Line") From 5f0c501acaa88644ad5d46039127253dce139a90 Mon Sep 17 00:00:00 2001 From: Danial Sarfraz Date: Mon, 16 Feb 2026 18:42:21 +0100 Subject: [PATCH 2/4] Fix billing line deletion if subscription line does not exist (#5879) --- .../App/Billing/Tables/BillingLine.Table.al | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al index 9b1c84fcef..95dafb0456 100644 --- a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al +++ b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al @@ -278,7 +278,8 @@ table 8061 "Billing Line" var ServiceCommitment: Record "Subscription Line"; begin - GetServiceCommitment(ServiceCommitment); + if not GetServiceCommitment(ServiceCommitment) then + exit; OnBeforeUpdateNextBillingDateInResetSubscriptionLineNextBillingDate(ServiceCommitment); if ("Document Type" = "Document Type"::"Credit Memo") and ("Correction Document Type" <> "Rec. Billing Document Type"::None) then @@ -502,7 +503,7 @@ table 8061 "Billing Line" internal procedure GetServiceCommitment(var ServiceCommitment: Record "Subscription Line") begin - ServiceCommitment.Get("Subscription Line Entry No."); + exit(ServiceCommitment.Get("Subscription Line Entry No.")); end; local procedure UpdateNextBillingDateFromUsageDataMetadata(var ServiceCommitment: Record "Subscription Line") From 3ae4b0e9c939a16513a9f7932f9ed76fc0272291 Mon Sep 17 00:00:00 2001 From: Danial Sarfraz Date: Wed, 18 Feb 2026 10:15:16 +0100 Subject: [PATCH 3/4] #5879 --- .../App/Billing/Tables/BillingLine.Table.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al index 95dafb0456..cc22098ed6 100644 --- a/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al +++ b/src/Apps/W1/Subscription Billing/App/Billing/Tables/BillingLine.Table.al @@ -501,7 +501,7 @@ table 8061 "Billing Line" begin end; - internal procedure GetServiceCommitment(var ServiceCommitment: Record "Subscription Line") + internal procedure GetServiceCommitment(var ServiceCommitment: Record "Subscription Line"): Boolean begin exit(ServiceCommitment.Get("Subscription Line Entry No.")); end; From 54fd19db45b1a77ce9e9de036683308bc3ed62ff Mon Sep 17 00:00:00 2001 From: Jesper Schulz-Wedde Date: Thu, 5 Mar 2026 14:57:41 +0100 Subject: [PATCH 4/4] Add missing return type