[E-Document] Remove Access = Internal from E-Doc. Data Exchange Impl. codeunit - #9014
Conversation
The
|
Copilot PR ReviewIteration 4 · Outcome: completed
Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Partners need to reuse the functions in their own implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
83bf494 to
d6c2500
Compare
This diff removes
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The diff removes 'Access = Internal;' from codeunit 6152 "E-Doc.Data Exchange Impl.", making it a public codeunit for the first time. This exposes 7 public procedures (Check, Create, CreateBatch, GetBasicInfoFromReceivedDocument, GetCompleteInfoFromReceivedDocument, ExtractHeaderFields, AddFieldToFieldBuffer, GetDataExchangePath) as part of the app's public/library surface without any XML documentation comments. Per the referenced guidance, public procedures on a library-role codeunit should carry Knowledge: Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
|
Pull request was closed
|
Copilot pull main into this pr |
…ccess-edoc-dataexchimpl
Done — I merged |
…ice and API Reports (microsoft#9812) ## What & why Refreshes the in-repo AL documentation (`CLAUDE.md` and `docs/*.md` files that live alongside the apps) for four apps whose docs had drifted behind the code. This is **documentation only** -- no AL source is touched. 62 files: 56 markdown files plus six `.docs-updated` marker files. Updates are change-driven, not a rewrite. For each app I established the baseline from the commit that last wrote its docs, diffed every commit since, mapped each changed AL object to the documentation that describes it, and updated only the affected sections. Existing narrative and voice were preserved. | App | Docs baseline | Drift covered | |---|---|---| | **E-Document Core** | `a090c078` (2026-03-25) | 55 commits, 149 AL files | | **Shopify Connector** | `3227a356` (2026-04-14) | 48 commits | | **Privacy Notice** | `41e62038` (2026-05-11) | 2 commits | | **API Reports - Finance** | `f5e9cbee` (2026-03-20) | 1 commit | `DataCorrectionFA` also has docs but has had no AL changes since they were written, so it is untouched. The commits are kept separate so each app can be reviewed independently. A third commit adds `.docs-updated` markers for the four documented apps that lacked one. Previously only Shopify had markers, so every other app's baseline had to be inferred from the git history of its docs folder -- which is precisely how E-Document drifted 55 commits behind unnoticed. All 82 doc-bearing folders in the repo now roll up under one of six markers, giving the next refresh an explicit baseline. ### E-Document Core The docs were created in March and only three files were ever refreshed since; the 18 module-level docs had not been touched at all. - **Import V2 is now the default** for new services, with the draft format selected on the service record. Documented the pipeline stages, the reader interfaces, and how a partner plugs in a new inbound format (microsoft#9702). - **Data Exchange** definitions moved from labels to app resource files (microsoft#9737), and the v2 bridge lets those definitions feed the V2 pipeline (microsoft#7565). `Access = Internal` was removed from the Data Exchange Impl. codeunit (microsoft#9014). - **PEPPOL now lives in a standalone app** under `src/Apps/W1/PEPPOL` (microsoft#8498). Added the EDI flows: purchase order send path (microsoft#7796), sales order receive path (microsoft#8558), and order response message handling (microsoft#8698). - **New structured format readers**, including XRechnung (microsoft#9690) and OIOUBL (microsoft#9682). - **Corrected stale documentation** that still described the E-Document Purchase Order Matching Copilot as current. It is obsoleted (microsoft#9572); AI-assisted line matching now happens at import time via `E-Doc. AI Tool Processor`. - Document date, due date and configurable default posting date behaviour (microsoft#7953, microsoft#9575, microsoft#8740), plus VAT rate resolution and VAT amount difference (microsoft#8251). - `E-Document Purchase Header` / `Purchase Line` exposed for country-app consumers (microsoft#8379), and Sales Header/Line data sensitivity classification (microsoft#9105). - Confirmed the `E-Document Header Mapping` / `Line Mapping` tables are retained for compatibility only and are **not** part of the V2 draft flow. ### Shopify Connector - **Unlisted product status** and the new `ICreateProductStatusValue` implementation (microsoft#9321, microsoft#9581). - **HS code and country of origin**, carried on the variant and gated by the Shop's `"Sync HS Code and Country"` field (microsoft#9320, microsoft#7414). - **Order tax lines can now hang off order shipping charges** (microsoft#9537), and market-driven shipping methods are fetched through new GraphQL queries. - **Return-with-exchange refunds**: the `"Is Exchange Item"` order line flag and the synthetic negative refund lines that keep the credit memo total matching `Refund.totalRefundedSet` (microsoft#8554). - Credit memo creation is skipped while a refund transaction is pending (microsoft#9112). - Order mapping keeps a manually set `Sell-to Customer No.` when Bill-to mapping fails (microsoft#9316), and creates a BC customer when Shopify has no default address (microsoft#9188). - Bulk price sync surfaces skipped records and the sent JSONL (microsoft#9211), and decides bulk versus single on the count of *changed* prices (microsoft#9126). - Corrected the **GraphQL rate limiter wait calculation** (microsoft#9146) and the query count. - `Auto Create Catalog` renamed to `Auto Create B2B Catalog`, now always visible with plan validation on enable (microsoft#8647, microsoft#8213). - Belgium Enterprise No. tax ID mapping (microsoft#9138) and ISO country code tax area filtering (microsoft#8072). - **Fixed a stale claim** in the Test docs that 3 tests were disabled via app-local `DisabledTests/*.json`. Those files were deleted in microsoft#8274 and the folder no longer exists; disabled-test filtering now comes from central `DisabledTests/<app>/` folders discovered by `build/scripts/RunTestsInBcContainer.ps1`. ### Privacy Notice - Registered the **Microsoft Copilot** privacy notice, whose default approval is keyed to the **EU Data Boundary** (`not ALCopilotFunctions.IsWithinEUDB()`), so EEA environments start unapproved and require an explicit admin decision (microsoft#9206). - Noted the inherent permissions on the public facade that let service-invoked callers reach it without holding Privacy Notice permissions (microsoft#9482). ### API Reports - Finance - The six API queries now carry `AboutText`, consumed by MCP tooling for tool selection (microsoft#6670). Documented that this is a functional description aimed at an agent, not a caption. ## Linked work Fixes [AB#644610](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/644610) Fixes [AB#644608](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/644608) No GitHub issue. This is a documentation-only maintenance refresh of the docs that live alongside these apps, not a product change, so there is no user-facing bug to file. Tracked internally by the two ADO tasks above. ## How I validated this - [x] I read the full diff and it contains only changes I intended. - [ ] I built the affected app(s) locally with no new analyzer warnings. *(Not applicable -- no AL source changed. See below.)* - [ ] I ran the change in Business Central and confirmed it behaves as expected. *(Not applicable -- documentation only.)* - [x] I added or updated tests for the new behavior, or explained below why none are needed. **What I tested and the outcome** Since this changes no compiled code, validation was about factual accuracy rather than build or runtime behaviour. Claims were checked against the AL source at `d86ecf32`: - `git diff --name-only` confirms only `.md` files and the two `.docs-updated` markers changed. Zero `.al` files. - **E-Document**: enumerated the actual interfaces under `src/Processing` and reconciled them against the extensibility docs. This caught a wrong pre-existing claim -- the old docs documented an `IPurchaseInvoiceProvider` interface that **does not exist**. The real interfaces are `IEDocumentCreatePurchaseInvoice`, `IEDocumentCreatePurchaseCreditMemo` and `IEDocumentCreateSalesOrder`, which the refreshed docs now use. Also verified the Copilot `ObsoleteReason` text, the standalone PEPPOL `app.json`, and that the only remaining reference to `E-Document Line Mapping` outside its own definition is the data-classification registration in `EDocumentSubscribers`. - **Shopify**: verified `Shpfy Shop` field 208 `"Find Mapping by Barcode"` and field 209 `"Sync HS Code and Country"`, `Unlisted` on both product-status enums, `Shpfy Order Line` field 22 `"Is Exchange Item"`, and `ShpfyShippingCharges.UpdateShippingCostInfos`. Verified the GraphQL claim numerically: 149 `.graphql` resource files matches 149 `ShpfyGraphQLType` enum values. Verified the DisabledTests correction by confirming the folder is gone and reading `Get-DisabledTests` in `RunTestsInBcContainer.ps1`. Verified `BindSubscription(BulkOpSubscriber)` appears only in `ShpfyWebhooksTest`. - **Privacy Notice**: read `GetMicrosoftCopilotID`, `TryGetMicrosoftCopilotDefaultApproval` and the `InherentEntitlements`/`InherentPermissions` declarations. - **API Reports**: confirmed `AboutText` is on exactly the six query objects and no pages. - Style and integrity checks all clean: `git diff --check`, no em dashes, no unclosed code fences, correct list spacing, no broken anchor links, all files CRLF. - No tests are needed because no product behaviour changed. I used agents to draft the per-module updates, then reviewed the diffs myself and corrected several things on top of their output: a speculative `TODO` about the Shopify bulk subscriber binding path (it is bound in `ShpfyWebhooksTest`), a `TODO` about the E-Document mapping tables (resolved by checking actual usage), the `"Sync HS Code and Country"` field name versus its caption, a missing `IProcessStructuredDataSales` reference in the sales guidance, and LF line endings on six Test files that should have been CRLF. ## Risk & compatibility None. Documentation only -- no runtime, upgrade, permission, or telemetry impact, and nothing that affects the compiled apps. Two things worth a reviewer's eye: 1. The E-Document Import extensibility doc was **reorganized**, not just appended to. Four narrow sections were consolidated into "Customize purchase resolution" and "Customize purchase finalization", and new sections were added for the Data Exchange bridge and sales order import. I checked the specific knowledge survived (provider defaults, the obsolete `IPurchaseLineAccountProvider` note, UOM resolution order), but the section structure did change. 2. The docs now assert fairly specific behaviour in areas I did not exercise in a container, particularly the PEPPOL send/receive/order-response flows, the E-Document V2 reader pipeline, and Shopify refund exchange lines. Statements are traced to source, but confirmation from the owners of those areas would be valuable. Shopify docs were deliberately left untouched for Payments and Order Fulfillments -- their only changes in the range were timestamp caption and tooltip wording with no behavioural meaning. --- *This supersedes microsoft#9808 (Shopify) and microsoft#9811 (E-Document), which are closed in favour of this single PR.* --------- Co-authored-by: Magnus Hartvig Grønbech <magnushar@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes AB#641216
Removes Access = Internal from the E-Doc. Data Exchange Impl. codeunit (6152) so partners can reuse the functions in their own E-Document implementations.