bcquality/microsoft/knowledge/events/add-new-event-parameters-at-the-end.md
Jesper Schulz-Wedde 2b5550c346
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
Improve partner onboarding and documentation navigation (#174)
Lead with a complete plugin quick start and add task-oriented usage, troubleshooting, customization, and contribution guides. Preserve the broader plugin framing, correct conflicting contract guidance, support Agents folder reviews, and align repository validation. Convert existing sample references to clickable links without changing knowledge rules.

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-09 17:31:03 +02:00

1.6 KiB

bc-version domain keywords technologies countries application-area
all
events
event-parameters
signature
backward-compatibility
public-event
local-event
internal-event
appsourcecop
as0024
as0025
al
w1
all

Event parameter additions depend on publisher access, not position

Description

Event subscribers bind publisher parameters by name and can omit parameters they do not use. A local or internal Business or Integration event can therefore gain a parameter at any position without breaking subscriber-only consumers; appending is not a compatibility requirement. A public event is also a public procedure that dependent extensions can raise, so adding a required parameter anywhere breaks callers under AppSourceCop AS0024.

Best Practice

Add a parameter directly only when the shipped event publisher is local or internal. Place it where the signature is clearest; existing subscribers continue binding the parameters they name. For a public event, keep the original publisher unchanged and introduce a new event with the expanded contract.

See sample: add-new-event-parameters-at-the-end.good.al.

Anti Pattern

Appending a parameter to a public event and assuming its position makes the change compatible. Existing external callers still lack the new required argument. Conversely, do not flag a parameter inserted among existing parameters on a local or internal Business or Integration event merely because it was not appended.

See sample: add-new-event-parameters-at-the-end.bad.al.