Skip to content

MSlenejennum/647454/sales internal new body layouts and obsolete current - #10495

Open
MSlenejennum wants to merge 9 commits into
mainfrom
MSlenejennum/647454/Sales-Internal-New-Body-Layouts-And-Obsolete-Current
Open

MSlenejennum/647454/sales internal new body layouts and obsolete current#10495
MSlenejennum wants to merge 9 commits into
mainfrom
MSlenejennum/647454/Sales-Internal-New-Body-Layouts-And-Obsolete-Current

Conversation

@MSlenejennum

@MSlenejennum MSlenejennum commented Aug 21, 2026

Copy link
Copy Markdown

What & why

all reports run with default theme and header footer design internal.

Report Object Old Design New Design
Customer - Order Summary 107 107 Old Word.pdf New Word 107.pdf
Salesperson - Sales Statistics 114 Old Word 114.pdf New Word 114.pdf
Salesperson - Commission 115 Old Word 115.pdf New Word 115.pdf

Each report gets a new WordBody layout with a body-only *Body.docx, and its existing Word
layout is marked ObsoleteState = Pending / ObsoleteTag = '30.0'.
DefaultRenderingLayout stays Excel, and Excel/RDLC layouts are untouched, so nothing changes
for existing users. DefaultHeaderFooterPart / DefaultThemePart are commented out until the
parts from 647452 land.

Linked work

AB#647454

How I validated this

  • I read the full diff and it contains only changes I intended.
  • [x ] I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.

What I tested and the outcome

  • Uploaded the report into Business Central and ran them.

Risk & compatibility

No default behavior change. The old Word layouts are obsoleted, not removed — partners with
derived layouts get a compile warning and should move to the body layout before the 32.0 cleanup.
Follow-up: enable the header/footer and theme parts once 647452 is merged.

Attacnhed you find the

MSlenejennum and others added 3 commits August 21, 2026 10:28
…urrent Word layouts

Cherry-picked from BCApps/features/643211/composite-layout-with-pr10134:

- Report 107 Customer - Order Summary
- Report 114 Salesperson - Sales Statistics
- Report 115 Salesperson - Commission

Each report gets a new WordBody layout (Subtype = Body) with its
*Body.docx file, and the existing Word layout is marked
ObsoleteState = Pending with ObsoleteTag 30.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…s/643211/migrate-existing-word-report-layouts-to-composite-document-report-structure

Takes the 6 files (3 .Report.al + 3 *Body.docx) verbatim from that branch,
tip 8443b74, for:

- Report 107 Customer - Order Summary
- Report 114 Salesperson - Sales Statistics
- Report 115 Salesperson - Commission

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ejennum/647454/Sales-Internal-New-Body-Layouts-And-Obsolete-Current
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 21, 2026
@github-actions github-actions Bot added the Team: SCM GitHub request for SCM area label Aug 21, 2026
@MSlenejennum MSlenejennum changed the title M slenejennum/647454/sales internal new body layouts and obsolete current MSlenejennum/647454/sales internal new body layouts and obsolete current Aug 21, 2026
…ejennum/647454/Sales-Internal-New-Body-Layouts-And-Obsolete-Current
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Accept with Suggestions

What this PR does

This PR adds a body-only WordBody Word layout to three sales reports - Customer - Order Summary (107), Salesperson - Sales Statistics (114), and Salesperson - Commission (115) - and marks each report's existing built-in Word layout as ObsoleteState = Pending, part of the move to the Document Report Experience (AB#647454). Each new layout ships as a *Body.docx file. The DefaultRenderingLayout and the Excel/RDLC layouts are untouched, so the default output does not change.

The change is a coherent, additive layout increment: it introduces the new body layouts and obsoletes the old Word ones without removing them, so partners with derived Word layouts get a compile warning rather than a break. The three reports are handled the same way, which is the right consistency. The layout content itself is inside binary .docx files and cannot be verified from the diff.

Suggestions

S1 - Obsolete tag and guard do not match the description
The code sets ObsoleteTag = '30.0' and applies the obsoletion unconditionally, but the PR description says the tag should be 32.0 behind #if not CLEAN32. Please align the tag (and the #if guard, if intended) with the correct cleanup version so the deprecation lands in the planned release.

Risk assessment and necessity

Risk: Low. This is report layout metadata only, with no posting, amount, or data logic. Because the default rendering layout is unchanged and the old layouts are obsoleted (not removed), existing users see no behavior change; the only external effect is a compile warning for partners with derived Word layouts, which is the intended deprecation signal. The main open items are the tag/guard mismatch above and the fact that the .docx layout content cannot be checked here, so the visual result rests on the author's in-product validation.

Necessity: Reasonable as an incremental step toward the Document Report Experience. The description notes the header/footer and theme parts are deliberately deferred until AB#647452 lands, which keeps this PR appropriately scoped. No automated test is warranted for a layout addition.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10495 round=1 by=alexei-dobriansky at=2026-08-23T00:10:47Z lastSha=a0d0a21d9d69cd664934fcb6364c3d96e505ca84 reviewKey=3f5b9b936012e26b131129dc0275386c64734fc62bb8a1fc5408de65711e2de0 suggestions=S1@7c799723

@MSlenejennum
MSlenejennum marked this pull request as ready for review August 23, 2026 19:25
@MSlenejennum
MSlenejennum requested a review from a team August 23, 2026 19:25
@MSlenejennum
MSlenejennum requested a review from a team as a code owner August 23, 2026 19:25
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 2

Recommendation: Accept with Suggestions

What this PR does

This PR adds a body-only WordBody Word layout to three sales reports - Customer - Order Summary (107), Salesperson - Sales Statistics (114), and Salesperson - Commission (115) - and marks each report's existing built-in Word layout as ObsoleteState = Pending, part of the move to the Document Report Experience. The default rendering layout and the Excel/RDLC layouts are unchanged, so the default output does not change.

The only change since round 1 is the commit ca9caa60 ("Updated layout"), which touches just the three binary *Body.docx files. No .al metadata changed in this round. The visual layout content is inside the binary .docx files and cannot be verified from the diff, so it still rests on in-product validation.

Status of previous suggestions
ID Title Status Author response
S1 Obsolete tag and guard do not match the description Not addressed No reply. The new commit only updates the .docx layouts; the .al files still set ObsoleteTag = '30.0' unconditionally, with no #if not CLEAN32 guard.

S1 - Obsolete tag and guard do not match the description
All three reports still set ObsoleteTag = '30.0' and obsolete the Word layout unconditionally, but the description says the tag should be 32.0 behind #if not CLEAN32. Please align the tag (and add the #if guard, if intended) so the deprecation lands in the planned cleanup version.

New observations (commits since round 1)

None. The single new commit changes only the binary .docx layout files, which cannot be reviewed from the diff.

Risk assessment and necessity

Risk: Low, and unchanged from round 1. This is report layout metadata only, with no posting, amount, or data logic. The default rendering layout stays the same and the old layouts are obsoleted (not removed), so existing users see no behavior change; the only external effect is a compile warning for partners with derived Word layouts. The open items are the tag/guard mismatch above and the fact that the .docx content cannot be checked here.

Necessity: Unchanged from round 1. Reasonable as an incremental step toward the Document Report Experience, and appropriately scoped. No automated test is warranted for a layout addition.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10495 round=2 by=alexei-dobriansky at=2026-08-24T00:09:01Z lastSha=ca9caa60bf6d880990a02ce215c8899d3ef8a27d reviewKey=9ea5ddbcf8c99bb56ad1fccaa4d5db01ac73aaacc65b4c99bcaed8fcea0bab02 suggestions=S1@7c799723:notaddressed parentRound=1

…ejennum/647454/Sales-Internal-New-Body-Layouts-And-Obsolete-Current
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

In src/Layers/APAC/BaseApp/Sales/Reports/SalespersonSalesStatistics.Report.al (report 114 "Salesperson - Sales Statistics"), the pre-existing rendering layout was named layout(RDLCLayout) with Type = RDLC. This PR keeps the identifier RDLCLayout but changes it to Type = Excel (new .xlsx file), and moves the actual legacy RDLC content into a brand-new, differently-named layout(RDLC). Report layout identifiers are the stable key used by Report Layout Selection / per-tenant custom layout configuration; any customer or partner setup that already selects report 114's built-in "RDLCLayout" will, after this upgrade, silently start receiving an Excel-formatted output instead of the RDLC output it previously produced — with no ObsoleteState/warning on the renamed element to signal the change. Compare with the sibling, unmodified W1 file src/Layers/W1/BaseApp/Sales/Reports/SalespersonSalesStatistics.Report.al (same report 114), which already keeps these as three distinctly-named layouts: layout(Excel), layout(Word), layout(RDLC). The APAC file should follow the same pattern: keep the existing RDLCLayout identifier bound to the RDLC content (optionally obsoleting it on its own timeline) and introduce the new Excel layout under a new, distinct identifier (e.g. layout(Excel)) instead of repurposing the pre-existing one.

Knowledge:

Line mapping was unavailable, so this was posted as an issue comment.

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

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 3

Recommendation: Request Changes

What this PR does

This PR adds body-only Word layouts for Sales report migration to the Document Report Experience and obsoletes the existing Word layouts. Since round 2, the new commit adds the RU Customer - Order Summary metadata and changes the APAC Salesperson - Sales Statistics rendering block.

The RU change matches the existing W1 pattern. The APAC change does not: it keeps the old layout(RDLCLayout) name but changes that layout from RDLC to Excel, while moving the RDLC file into a new layout(RDLC). This breaks the stated goal that default and existing layout behavior stay unchanged.

Status of previous suggestions
ID Title Status Author response
S1 Obsolete tag and guard do not match the description Not addressed No reply. The PR body still says ObsoleteTag = '32.0' behind #if not CLEAN32, while the code and linked slice use ObsoleteTag = '30.0' without that guard.
New observations (commits since round 2)

S2 - Do not reuse RDLCLayout for Excel
In the APAC report, layout(RDLCLayout) already existed as the RDLC layout and is also the default rendering layout. The new commit changes it to Excel, so existing default or saved selections can produce Excel output instead of RDLC. Keep RDLCLayout as RDLC and add any Excel layout under a new layout name.

Risk assessment and necessity

Risk: The W1 and RU body-layout additions are metadata-only and low risk. The APAC report change is high risk because it changes the output format behind an existing layout identifier and the report still has DefaultRenderingLayout = RDLCLayout.

Necessity: The body-layout migration is a valid slice, but it must preserve existing layout selections. Fixing the APAC layout identity is required before this can merge safely; no automated test is required for the body-layout metadata itself.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10495 round=3 by=alexei-dobriansky at=2026-08-24T12:16:40Z lastSha=2870039ef8166a486ebf37d7636eb116b4e3a654 reviewKey=43275c4ac65309ee35925f26631b729becee8297869b042910a3bada4eb274e2 suggestions=S1@7c799723:notaddressed,S2@a7e699c4:new parentRound=2

{
layout(RDLCLayout)
{
Caption = 'Salesperson Sales Statistics Excel';

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.

Existing APAC layout name changed from RDLC to Excel. The layout RDLCLayout was RDLC and now becomes Type = Excel with an .xlsx file, and a new layout named RDLC is added. Report 114 still has DefaultRenderingLayout = RDLCLayout, so APAC users get Excel output by default instead of RDLC, and any saved layout selection that points to RDLCLayout also switches. Please keep RDLCLayout as the RDLC layout and add only the new body layout.

LayoutFile = '.\Sales\Reports\CustomerOrderSummary.docx';
Type = Word;
Summary = 'Built in layout for the Customer Order Summary word report.';
ObsoleteState = Pending;

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.

Obsoleted Word layout is still referenced, so Clean builds fail. RU report 107 keeps DefaultRenderingLayout = Word while this PR marks that Word layout ObsoleteState = Pending. The Clean pipelines for about 20 countries fail with AS0105 The ReportLayout 'Word' cannot be referenced ... ObsoleteTag '30.0'. Please move the default to a layout that is not obsolete, so no object references the obsoleted layout.

Type = Word;
LayoutFile = './Sales/Reports/SalespersonSalesStatistics.docx';
Summary = 'Report layout made for print. Use a Word editor to modify the layout.';
ObsoleteState = Pending;

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.

The PR description does not match the code. It says ObsoleteTag = '32.0' behind #if not CLEAN32 and that the default rendering layout stays Excel, but the code uses ObsoleteTag = '30.0', has no CLEAN guard, and the RU and APAC defaults are not Excel. Please update the description and confirm the obsolete tag matches the target release.

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.

Recommendation: Request Changes

The W1 and RU body-layout additions are coherent, additive changes, but the APAC update introduces a compatibility regression and the obsolete lifecycle remains inconsistent with the declared cleanup plan.

S1 - Align the obsolete lifecycle with the planned cleanup version

The PR description says the old Word layouts use ObsoleteTag = '32.0' behind #if not CLEAN32, but every changed report currently uses ObsoleteTag = '30.0' unconditionally. Please make the implementation and declared cleanup plan consistent so the deprecation is introduced and removed in the intended release.

S2 - Preserve the APAC RDLCLayout identity and default output

In the APAC report, RDLCLayout was the existing RDLC layout and remains the value of DefaultRenderingLayout. This PR rebinds that same identifier to an Excel file and moves RDLC to a new RDLC identifier. Existing default and saved layout selections can therefore silently produce Excel output instead of RDLC. Keep RDLCLayout bound to the RDLC layout and add Excel under a distinct layout identifier.

The W1 and RU changes are otherwise low-risk layout metadata additions. The APAC identifier reuse is blocking because it changes output format behind an existing default layout key.

@github-actions

Copy link
Copy Markdown
Contributor

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

In src/Layers/RU/BaseApp/Sales/Reports/CustomerOrderSummary.Report.al, the report property DefaultRenderingLayout = Word; (line 24) still points at the Word layout that this same PR marks ObsoleteState = Pending (with an ObsoleteReason directing users to the new WordBody layout instead). The report will keep defaulting end users to the layout that is being deprecated, and once CLEAN30 removes the Word layout, DefaultRenderingLayout will reference a name that no longer exists, which is a broken/undefined default. The W1/APAC sibling reports in this same diff use DefaultRenderingLayout = Excel or RDLCLayout and are unaffected, making the RU file the outlier. Update DefaultRenderingLayout to WordBody (or another non-obsolete layout) alongside the obsoletion change.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

    DefaultRenderingLayout = WordBody;

Line mapping was unavailable, so this was posted as an issue comment.

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

LayoutFile = './Sales/Reports/SalespersonSalesStatistics.xlsx';
Summary = 'Report layout primarily made for data analysis. Use an Excel editor to modify the layout.';
}
#if not CLEAN30

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{🟠\ High\ Severity\ —\ Breaking\ Changes}$

The APAC variant of "Salesperson - Sales Statistics" (report 114) previously had only an RDLCLayout; this PR introduces a brand-new layout(Word) wrapped in #if not CLEAN30 and marks it ObsoleteState = Pending at the moment of its introduction. This ships new report-layout behavior that is already scheduled for removal: any tenant setup, report selection, or extension that starts depending on this Word layout before CLEAN30 flips is being pointed at a transient, already-deprecated contract with no real usable lifetime. Prefer shipping only the supported Excel/WordBody layouts here, or introduce the Word layout without the immediate obsoletion if it needs a real (non-transient) lifetime.

Knowledge:

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

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 4

Recommendation: Request Changes

What changed since round 3

Only the APAC report Salesperson - Sales Statistics (report 114) changed. The round-3 blocker was the Excel layout reusing the RDLCLayout identifier. This commit:

  • renames the Excel layout to layout(ExcelLayout),
  • restores layout(RDLCLayout) as the RDLC layout (Type = RDLC, the .rdlc file), matching DefaultRenderingLayout = RDLCLayout,
  • wraps the obsolete layout(Word) in #if not CLEAN30 (tag ObsoleteTag = '30.0').
Status of previous suggestions
ID Title Status Evidence
S1 Obsolete tag and guard do not match Partially addressed The Word layout now carries a #if not CLEAN30 guard whose version matches ObsoleteTag = '30.0', so tag and guard version are consistent. But the guard is malformed - see S3.
S2 Do not reuse RDLCLayout for Excel Addressed RDLCLayout is RDLC again (Type = RDLC, .rdlc), the Excel layout is now ExcelLayout, and DefaultRenderingLayout = RDLCLayout resolves to RDLC. Existing default and saved selections keep rendering RDLC.
New observations (commits since round 3)

S3 (🔴 High): The #endif is inside the layout(Word) block, so enabling CLEAN30 breaks compilation.
The guard is written as:

#if not CLEAN30
        layout(Word)
        {
            ...
            ObsoleteTag = '30.0';
#endif
        }
        layout(RDLCLayout)

The #endif sits before the layout's closing }. With CLEAN30 undefined (today) everything is kept, so it compiles - which is why CI is green. But when CLEAN30 is defined, the preprocessor removes layout(Word) { ... ObsoleteTag = '30.0'; and leaves the dangling }, which breaks the rendering { } block and fails the build. Move the #endif to after the closing brace:

#if not CLEAN30
        layout(Word)
        {
            ...
            ObsoleteTag = '30.0';
        }
#endif
        layout(RDLCLayout)

Since removability at CLEAN30 is the whole purpose of adding the guard, this needs to be fixed before merge.

Risk assessment and necessity

Risk: The layout-identity fix (S2) removes the round-3 high risk - existing selections render RDLC again, and the Excel layout has its own name. The remaining risk is the malformed guard: it does not break runtime or today's CI, but it will break the CLEAN30 cleanup build, which is exactly the scenario the guard exists to support.

Necessity: The body-layout migration and the APAC identity fix are valid and now correct. Only the one-line #endif placement stands between this and a clean, safe merge. No automated test is required for the layout metadata itself.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10495 round=4 by=alexei-dobriansky at=2026-08-25T12:15:00Z lastSha=e2f7ac0db65cd65c5181f3eee2f1e10e68e1d2e6 reviewKey=81e8c2e8c475e9601e9f3c1e4eeb3c6fdc8ddd04733aa6563bfb83317f8fdcc0 suggestions=S1@7c799723:addressed,S2@a7e699c4:addressed,S3@416fd5d0:new parentRound=3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants