[E-Document] Expose E-Document Purchase Header / Line for country-app consumers#8379
[E-Document] Expose E-Document Purchase Header / Line for country-app consumers#8379Groenbech96 wants to merge 1 commit into
Conversation
… consumers Removes Access = Internal from tables 6100 "E-Document Purchase Header" and 6101 "E-Document Purchase Line", and promotes EDocumentPurchaseLine.GetNextLineNo from internal procedure to public. Country-specific E-Document format apps need to populate draft purchase headers and lines from their own format handlers without the W1 E-Document Core app having to grant internalsVisibleTo to each country app. Promoting these two staging tables to public API removes that long-term coupling. Tables stay structurally unchanged: no fields added, removed, or renamed. Other internal procedures on these tables remain internal -- only GetNextLineNo is exposed (called from country handlers when appending lines).
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
CustomerContent data exposed to all extensionsTable 6100 holds numerous fields classified as Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
CustomerContent line data exposed publiclyTable 6101 is classified at the table level as Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Table access widened from Internal to PublicRemoving Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
Purchase line table access widened to PublicRemoving Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
| end; | ||
|
|
||
| internal procedure GetNextLineNo(EDocumentEntryNo: Integer): Integer | ||
| procedure GetNextLineNo(EDocumentEntryNo: Integer): Integer |
There was a problem hiding this comment.
Internal line-number utility exposed publicly
Changing GetNextLineNo from internal to public allows external extensions to invoke the procedure and obtain the next line sequence number. Combined with the table now being public, an external caller could use this to pre-allocate line numbers and insert records at predictable positions, leading to line-number collisions or intentional ordering attacks on the purchase line sequence.
Recommendation:
- Revert the procedure to
internal procedure GetNextLineNo(...)to keep line-number management encapsulated within the extension.
| procedure GetNextLineNo(EDocumentEntryNo: Integer): Integer | |
| internal procedure GetNextLineNo(EDocumentEntryNo: Integer): Integer |
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
Summary
Access = Internalfrom tables6100 "E-Document Purchase Header"and6101 "E-Document Purchase Line".EDocumentPurchaseLine.GetNextLineNofrominternal procedureto public.Why
Country-specific E-Document format apps need to populate draft purchase headers and lines from their own
IStructuredFormatReaderimplementations. Today they can only do that by adding the country app to W1 E-Document Core'sinternalsVisibleTo, which is undesirable as a long-term pattern (every new country format = anotherinternalsVisibleToentry into a core W1 app).Concrete driver: the upcoming DE XRechnung structured-format reader (ALAppExtensions #29097 / NAV PR 247053). Promoting these two staging tables to public API removes that coupling for DE and any future country format apps.
Scope
GetNextLineNois exposed (called from country handlers when appending lines).Test plan
internalsVisibleTo.