Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
793635e
621963 deprecate table 9650 Custom Report Layout (Pending, tag 29.0) …
V-CWurtzen Aug 3, 2026
cc91a2d
621963 suppress the Clean-build AppSourceCop gates for the obsoleted …
V-CWurtzen Aug 4, 2026
0e75ad0
621963 suppress AS0105 for table 9650 references to itself
V-CWurtzen Aug 4, 2026
d544607
621963 suppress AS0105 in the remaining live reference sites, includi…
V-CWurtzen Aug 4, 2026
e00e0f9
621963 pragma the AA0137 orphan left by the CLEAN29 guard in Report L…
V-CWurtzen Aug 4, 2026
737d79f
621963 suppress AS0032 on the two CZ localization report-selection pages
V-CWurtzen Aug 4, 2026
392e212
621963 WIP checkpoint: flip the table state and wrap the mechanical a…
V-CWurtzen Aug 7, 2026
013b66b
621963 convert the remaining product-code references to CLEAN29 guards
V-CWurtzen Aug 7, 2026
6bc4007
621963 fix guard boundaries and the using directives the conversion o…
V-CWurtzen Aug 9, 2026
745272c
621963 merge origin/main and resolve the ReportManagement using block
V-CWurtzen Aug 9, 2026
006c7df
621963 close the Clean-build breaking-change and orphan findings
V-CWurtzen Aug 9, 2026
fcdf6c1
621963 guard the declarations the upgrade-path wrap orphaned
V-CWurtzen Aug 10, 2026
9cd377b
621963 wrap the test-layer references the Removed table turns into ha…
V-CWurtzen Aug 10, 2026
6c11355
621963 wrap the contained test-layer references to the removed table
V-CWurtzen Aug 11, 2026
f222f2e
621963 sweep the remaining public-matrix test references and the anal…
V-CWurtzen Aug 11, 2026
b543f0b
621963 close round 15's three failure families and finish the country…
V-CWurtzen Aug 12, 2026
b8d0c6b
621963 wrap the Usage option global the first Tests-Report analyzer p…
V-CWurtzen Aug 12, 2026
1dc2b78
621963 restore the trailing newlines the pragma sweep dropped
V-CWurtzen Aug 12, 2026
bfbe369
621963 address review: keep O365 HTML Template relation in Clean buil…
V-CWurtzen Aug 15, 2026
0df8b87
Merge origin/main into features/621963-deprecate-custom-report-layout…
V-CWurtzen Aug 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using System.Reflection;
/// <summary>
/// Configures default report selections for cash desk. Allows users to specify which reports to use for printing, emailing, and other output operations.
/// </summary>
#pragma warning disable AS0032

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ AppSource}$

The new AS0032 suppression spans almost the entire page 31222 "Report Sel. - Cash Desk CZP" (lines 13-217) instead of only the obsolete report-selection or custom-layout references it was added for. That object-wide disable will also hide any later unrelated AppSource violation in the same file. Move the disable/restore pair down to the exact CLEAN29-gated lines that still need it.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4

page 31222 "Report Sel. - Cash Desk CZP"
{
AboutTitle = 'About report selection for cash desk';
Expand Down Expand Up @@ -120,12 +121,16 @@ page 31222 "Report Sel. - Cash Desk CZP"
ToolTip = 'Specifies the ID of the custom email body layout that is used.';
Visible = false;
}
#if not CLEAN29
#pragma warning disable AL0432
field("Email Body Layout Description"; Rec."Email Body Layout Description")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies a description of the custom email body layout that is used.';
Visible = false;
}
#pragma warning restore AL0432
#endif
}
}
area(factboxes)
Expand Down Expand Up @@ -209,4 +214,5 @@ page 31222 "Report Sel. - Cash Desk CZP"
begin
end;
}
#pragma warning restore AS0032

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ using System.Reflection;
/// <summary>
/// Configures default report selections for compensations. Allows users to specify which reports to use for printing, emailing, and other output operations.
/// </summary>
#pragma warning disable AS0032

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ AppSource}$

The new AS0032 suppression spans almost the entire page 31282 "Report Selection - Comp. CZC" (lines 13-209) instead of only the obsolete report-selection or custom-layout references it was added for. That object-wide disable will also hide any later unrelated AppSource violation in the same file. Move the disable/restore pair down to the exact CLEAN29-gated lines that still need it.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4

page 31282 "Report Selection - Comp. CZC"
{
AboutTitle = 'About report selection for compensation';
Expand Down Expand Up @@ -120,12 +121,16 @@ page 31282 "Report Selection - Comp. CZC"
ToolTip = 'Specifies the ID of the custom email body layout that is used.';
Visible = false;
}
#if not CLEAN29
#pragma warning disable AL0432
field("Email Body Layout Description"; Rec."Email Body Layout Description")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies a description of the custom email body layout that is used.';
Visible = false;
}
#pragma warning restore AL0432
#endif
}
}
area(factboxes)
Expand Down Expand Up @@ -201,4 +206,5 @@ page 31282 "Report Selection - Comp. CZC"
begin
end;
}
#pragma warning restore AS0032

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ using Microsoft.Purchases.History;
using Microsoft.Purchases.Payables;
using Microsoft.Purchases.Setup;
using Microsoft.Purchases.Vendor;
#if not CLEAN29
using Microsoft.Sales.Customer;
#endif
using Microsoft.Sales.Document;
using Microsoft.Sales.History;
using Microsoft.Service.Document;
Expand All @@ -34,6 +36,7 @@ using System.Environment.Configuration;
using System.TestLibraries.Utilities;
using System.Utilities;

#pragma warning disable AL0432, AS0105

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ AppSource}$

The new AS0105 suppression spans almost the entire codeunit 139515 "Digital Vouchers Tests" (lines 37-2060) instead of only the obsolete-table references introduced by this cleanup. Keeping the AppSource rule disabled at object scope will hide future unrelated AppSource violations anywhere in the file. Narrow the disable/restore pair to the exact obsolete declarations or calls that still require it.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4

codeunit 139515 "Digital Vouchers Tests"
{
Subtype = Test;
Expand All @@ -53,8 +56,12 @@ codeunit 139515 "Digital Vouchers Tests"
LibraryRandom: Codeunit "Library - Random";
LibraryLowerPermissions: Codeunit "Library - Lower Permissions";
Assert: Codeunit Assert;
#if not CLEAN29
LibraryEmail: Codeunit "Library - Email";
#endif
#if not CLEAN29
ActiveDirectoryMockEvents: Codeunit "Active Directory Mock Events";
#endif
LibrarySmallBusiness: Codeunit "Library - Small Business";
LibraryService: Codeunit "Library - Service";
IsInitialized: Boolean;
Expand Down Expand Up @@ -494,6 +501,7 @@ codeunit 139515 "Digital Vouchers Tests"
UnbindSubscription(DigVouchersDisableEnforce);
end;

#if not CLEAN29
[Test]
[HandlerFunctions('StrMenuHandler,VerifyNoAttachmentsInEmailEditorModalPageHandler')]
procedure PostSalesDocAndSendEmailWithDigitalVoucherAutomaticallyGenerated()
Expand Down Expand Up @@ -534,6 +542,7 @@ codeunit 139515 "Digital Vouchers Tests"

UnbindSubscription(DigVouchersDisableEnforce);
end;
#endif

[Test]
procedure PostMultipleGeneralJournalLinesWithGenerateAutomaticallyOption()
Expand Down Expand Up @@ -1949,6 +1958,7 @@ codeunit 139515 "Digital Vouchers Tests"
LibraryERM.FindVendorLedgerEntry(VendorLedgerEntry, VendorLedgerEntry."Document Type"::Invoice, DocNo);
end;

#if not CLEAN29
local procedure PrepareSalesShipmentReportSelectionsForEmailBodyWithoutAttachment()
var
ReportSelections: Record "Report Selections";
Expand All @@ -1957,7 +1967,9 @@ codeunit 139515 "Digital Vouchers Tests"
ReportSelections.ModifyAll("Use for Email Body", false);
ReportSelections.ModifyAll("Use for Email Attachment", false);
end;
#endif

#if not CLEAN29
local procedure CreateCustomReportSelectionForCustomer(CustomerNo: Code[20]; ReportSelectionUsage: Enum "Report Selection Usage"; ReportID: Integer)
var
CustomReportSelection: Record "Custom Report Selection";
Expand All @@ -1975,14 +1987,17 @@ codeunit 139515 "Digital Vouchers Tests"
"Email Body Layout Code", CustomReportLayout.InitBuiltInLayout(CustomReportSelection."Report ID", CustomReportLayout.Type::Word.AsInteger()));
CustomReportSelection.Insert(true);
end;
#endif

#if not CLEAN29
local procedure BindActiveDirectoryMockEvents()
begin
if ActiveDirectoryMockEvents.Enabled() then
exit;
BindSubscription(ActiveDirectoryMockEvents);
ActiveDirectoryMockEvents.Enable();
end;
#endif

local procedure CreateBankAccReconciliationLine(BankAccReconciliation: Record "Bank Acc. Reconciliation"; var BankAccReconciliationLine: Record "Bank Acc. Reconciliation Line"; AccountType: Enum "Gen. Journal Account Type"; AccountNo: Code[20]; Amount: Decimal; Date: Date)
begin
Expand Down Expand Up @@ -2056,3 +2071,4 @@ codeunit 139515 "Digital Vouchers Tests"
TestEmailEditor.Attachments.FileName.AssertEquals('');
end;
}
#pragma warning restore AL0432, AS0105
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ using Microsoft.Sales.History;
using Microsoft.Sustainability.Account;
using Microsoft.Sustainability.Setup;
using Microsoft.Test.Sustainability;
#if not CLEAN29
using System.Reflection;
using System.Utilities;
#endif

#pragma warning disable AL0432, AS0105

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ AppSource}$

The new AS0105 suppression spans almost the entire codeunit 148217 "Sustainability Report Tests" (lines 18-481) instead of only the obsolete-table references introduced by this cleanup. Keeping the AppSource rule disabled at object scope will hide future unrelated AppSource violations anywhere in the file. Narrow the disable/restore pair to the exact obsolete declarations or calls that still require it.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.31.4

codeunit 148217 "Sustainability Report Tests"
{
Subtype = Test;
Expand All @@ -33,9 +36,11 @@ codeunit 148217 "Sustainability Report Tests"
AccountCodeLbl: Label 'AccountCode%1', Comment = '%1 = Number';
CategoryCodeLbl: Label 'CategoryCode%1', Comment = '%1 = Number';
SubcategoryCodeLbl: Label 'SubcategoryCode%1', Comment = '%1 = Number';
#if not CLEAN29
MSXLbl: Label 'MSX%1', Comment = '%1 = random number for unique layout code';
MSXILbl: Label 'MSXI%1', Comment = '%1 = random number for unique layout code';
DocxLbl: Label 'docx';
#endif
TotalCO2eLbl: Label 'TotalCO2e';
CO2ePerUnitLineLbl: Label 'CO2ePerUnit_Line';
DisclaimerLbl: Label 'Disclaimer_Lbl';
Expand All @@ -53,7 +58,9 @@ codeunit 148217 "Sustainability Report Tests"
UnitOfMeasure: Record "Unit of Measure";
SalesHeader: Record "Sales Header";
SalesLine: Record "Sales Line";
#if not CLEAN29
CustomReportLayout: Record "Custom Report Layout";
#endif
ExpectedCO2ePerUnit: Decimal;
ExpectedTotalCO2e: Decimal;
ExpectedFormatCO2ePerUnit: Text;
Expand All @@ -72,8 +79,10 @@ codeunit 148217 "Sustainability Report Tests"
// [GIVEN] Update "Emission Unit of Measure Code" in Sustainability Setup.
UpdateEmissionUnitOfMeasureInSustainabilitySetup(UnitOfMeasure.Code);

#if not CLEAN29
// [GIVEN] Select layout as Custom Body Layout in "Standard Sales-Quote" report.
GetCustomBodyLayout(CustomReportLayout, GetStandardSalesQuoteReportID());
#endif

// [GIVEN] Generate Random CO2e per Unit.
ExpectedCO2ePerUnit := LibraryRandom.RandDec(20, 2);
Expand Down Expand Up @@ -117,7 +126,9 @@ codeunit 148217 "Sustainability Report Tests"
UnitOfMeasure: Record "Unit of Measure";
SalesHeader: Record "Sales Header";
SalesLine: Record "Sales Line";
#if not CLEAN29
CustomReportLayout: Record "Custom Report Layout";
#endif
ExpectedCO2ePerUnitCaption: Text;
ExpectedTotalCO2eCaption: Text;
begin
Expand All @@ -133,8 +144,10 @@ codeunit 148217 "Sustainability Report Tests"
// [GIVEN] Update "Emission Unit of Measure Code" in Sustainability Setup.
UpdateEmissionUnitOfMeasureInSustainabilitySetup(UnitOfMeasure.Code);

#if not CLEAN29
// [GIVEN] Select layout as Custom Body Layout in "Standard Sales-Quote" report.
GetCustomBodyLayout(CustomReportLayout, GetStandardSalesQuoteReportID());
#endif

// [GIVEN] Create a Sales Quote.
CreateSalesQuote(SalesHeader, SalesLine);
Expand All @@ -161,7 +174,9 @@ codeunit 148217 "Sustainability Report Tests"
var
SustainabilitySetup: Record "Sustainability Setup";
UnitOfMeasure: Record "Unit of Measure";
#if not CLEAN29
CustomReportLayout: Record "Custom Report Layout";
#endif
SalesInvoiceHeader: Record "Sales Invoice Header";
Quantity: Decimal;
ExpectedCO2ePerUnit: Decimal;
Expand All @@ -182,8 +197,10 @@ codeunit 148217 "Sustainability Report Tests"
// [GIVEN] Update "Emission Unit of Measure Code" in Sustainability Setup.
UpdateEmissionUnitOfMeasureInSustainabilitySetup(UnitOfMeasure.Code);

#if not CLEAN29
// [GIVEN] Select layout as Custom Body Layout in "Standard Sales-Invoice" report.
GetCustomBodyLayout(CustomReportLayout, GetStandardSalesInvoiceReportID());
#endif

// [GIVEN] Generate Random CO2e per Unit and Quantity.
ExpectedCO2ePerUnit := LibraryRandom.RandDec(20, 2);
Expand Down Expand Up @@ -224,7 +241,9 @@ codeunit 148217 "Sustainability Report Tests"
procedure VerifyCO2ePerUnitAndTotalCO2eCaptionInStandardSalesInvoice()
var
UnitOfMeasure: Record "Unit of Measure";
#if not CLEAN29
CustomReportLayout: Record "Custom Report Layout";
#endif
SalesInvoiceHeader: Record "Sales Invoice Header";
Quantity: Decimal;
ExpectedCO2ePerUnit: Decimal;
Expand All @@ -243,8 +262,10 @@ codeunit 148217 "Sustainability Report Tests"
// [GIVEN] Update "Emission Unit of Measure Code" in Sustainability Setup.
UpdateEmissionUnitOfMeasureInSustainabilitySetup(UnitOfMeasure.Code);

#if not CLEAN29
// [GIVEN] Select layout as Custom Body Layout in "Standard Sales-Invoice" report.
GetCustomBodyLayout(CustomReportLayout, GetStandardSalesInvoiceReportID());
#endif

// [GIVEN] Generate Random CO2e per Unit and Quantity.
ExpectedCO2ePerUnit := LibraryRandom.RandDec(20, 2);
Expand Down Expand Up @@ -301,6 +322,7 @@ codeunit 148217 "Sustainability Report Tests"
LibraryTestInitialize.OnAfterTestSuiteInitialize(Codeunit::"Sustainability Report Tests");
end;

#if not CLEAN29
local procedure GetCustomBodyLayout(var CustomReportLayout: Record "Custom Report Layout"; ReportID: Integer)
var
ReportLayoutList: Record "Report Layout List";
Expand Down Expand Up @@ -333,6 +355,7 @@ codeunit 148217 "Sustainability Report Tests"
CopyStream(OutStr, InStr);
CustomReportLayout.Insert();
end;
#endif

local procedure CreateSustainabilityCategory(var CategoryCode: Code[20]; i: Integer)
begin
Expand Down Expand Up @@ -425,6 +448,7 @@ codeunit 148217 "Sustainability Report Tests"
SustainabilityDisclaimer.Insert();
end;

#if not CLEAN29
local procedure GetStandardSalesQuoteReportID(): Integer
begin
exit(Report::"Standard Sales - Quote");
Expand All @@ -434,6 +458,7 @@ codeunit 148217 "Sustainability Report Tests"
begin
exit(Report::"Standard Sales - Invoice");
end;
#endif

local procedure RunStandardSalesQuoteReport(QuoteNo: Code[20])
var
Expand Down Expand Up @@ -476,4 +501,5 @@ codeunit 148217 "Sustainability Report Tests"
begin
StandardSalesInvoice.SaveAsXml(LibraryReportDataset.GetParametersFileName(), LibraryReportDataset.GetFileName());
end;
}
}
#pragma warning restore AL0432, AS0105
Loading
Loading