bcquality/microsoft/knowledge/ui/control-addin-throttle-al-calls-and-payload-size.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

2.1 KiB

bc-version domain keywords technologies countries application-area
20..
ui
control-add-in
invokeextensibilitymethod
success-callback
throttling
payload
reduced-functionality
javascript
w1
all

Serialize control add-in AL calls and keep payloads small

Description

InvokeExtensibilityMethod crosses from a control add-in into the Business Central service. Repeated calls that outpace AL execution fill the communication channel, trigger reduced-functionality warnings, and can be queued, throttled, or rejected; an oversized single payload can also be rejected immediately. The success and error callbacks exist so the add-in can bound this traffic.

Best Practice

Send byte-bounded chunks and invoke the next AL event only from the previous call's completion callback. Handle the error callback and stop until the caller explicitly retries or discards the failed chunk. There is no universal safe threshold, so measure the serialized argument array, reserve transport headroom below the server's ClientServicesMaxUploadSize, and reject an individual item that exceeds the configured budget.

See sample: control-addin-throttle-al-calls-and-payload-size.good.js.

Anti Pattern

Calling InvokeExtensibilityMethod on an interval without tracking completion, recursively creating intervals, or serializing an entire unbounded dataset into one call. These patterns can overwhelm the client-service channel or exceed the upload limit.

See sample: control-addin-throttle-al-calls-and-payload-size.bad.js.

Source

Control add-in performance best practices, InvokeExtensibilityMethod, and control add-in resiliency.