bcquality/microsoft/knowledge
Wenjie Fan 85ceaaa1a4
Some checks failed
Validate knowledge index / validate-index (push) Has been cancelled
Validate AL review fixtures / validate-review-fixtures (push) Has been cancelled
Validate frontmatter and structure / validate (push) Has been cancelled
knowledge(style): event subscribers bind by parameter name, so a shorter list is not a mismatch (#138)
* knowledge(style): allow event subscribers to omit trailing publisher parameters

The article told reviewers to copy the publisher signature exactly and reproduce every parameter verbatim. That contradicts events/add-new-event-parameters-at-the-end, which already states that existing subscribers bind to the leading parameters, and it produced a false positive on BCApps PR 10277 where a subscriber legitimately declared only the leading two of the publisher's three parameters.

Clarify that the name-match rule applies to every parameter the subscriber declares, state that AL binds on a leading prefix so trailing parameters may be omitted, and keep the real defect - a subscriber list that is not a prefix of the publisher's - as the anti pattern. Add the false-positive keyword for retrieval.

* fix: subscribers bind by parameter name, not by leading prefix

The first revision claimed AL binds a subscriber to a leading prefix of the publisher parameter list and that a parameter may not be skipped in the middle. That is wrong. Verified against shipping BCApps code: Test Runner - Mgt publishes OnBeforeTestMethodRun(var CurrentTestMethodLine; CodeunitID; CodeunitName; FunctionName; FunctionTestPermissions; var Skip), and ALTestRunnerResetEnvironment binds to it declaring (CodeunitID; CodeunitName; FunctionName; FunctionTestPermissions; var CurrentTestMethodLine) - omitting Skip and moving the first parameter to last. Binding is by name, so any subset in any order is valid. Detection now targets a parameter whose name or type matches nothing on the publisher.

---------

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
2026-08-28 11:07:05 +02:00
..
appsource Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
breaking-changes Add FP guards for field relocation to tableextension and event parameter addition 2026-08-04 10:41:03 +02:00
data-modeling Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
error-handling knowledge: add 3 FP-suppression guards from BC apps negative feedback 2026-07-21 09:45:09 +02:00
events Add FP guards for field relocation to tableextension and event parameter addition 2026-08-04 10:41:03 +02:00
interfaces Add P0 event and interface compatibility knowledge (#98) 2026-07-14 12:51:59 +02:00
performance Correct severe misconception about SetCurrentKey in the knowledge base 2026-08-22 12:04:00 +02:00
privacy Scope tableextension requirement to Normal fields lacking a classification 2026-08-17 15:25:14 +02:00
query Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
security Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
style knowledge(style): event subscribers bind by parameter name, so a shorter list is not a mismatch (#138) 2026-08-28 11:07:05 +02:00
telemetry Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
testing Complete AL review knowledge readiness (#108) 2026-07-15 10:55:25 +02:00
ui Add batch-2 FP guards: sentence-case action captions + primary-key Get is transaction-cached 2026-07-21 11:08:04 +02:00
upgrade knowledge: add 3 FP-suppression guards from BC apps negative feedback 2026-07-21 09:45:09 +02:00
web-services Add P0 integration and control add-in runtime guidance (#100) 2026-07-14 12:53:26 +02:00
.gitkeep Add .gitkeep files to community and microsoft directories; remove .gitkeep from samples 2026-04-17 06:03:14 +02:00