Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.93 KB

devenv-control-addin-asynchronous-considerations.md

File metadata and controls

28 lines (21 loc) · 1.93 KB
title ms.date ms.topic ms.assetid author description
Asynchronous considerations for control add-ins
12/29/2023
conceptual
6c90376e-b86e-406d-880d-3cc905bf6527
SusanneWindfeldPedersen
Learn about asynchronous communication limitations in Dynamics 365 Business Central server and how to effectively write control add-ins for all display targets.

Asynchronous considerations

When writing control add-ins that work on all display targets, you have to consider some limitations regarding asynchronous communication. The limitations come from the nature of the asynchronous communication between the clients and the [!INCLUDEd365fin_long_md] server. All calls between the AL code running on the [!INCLUDEd365fin_long_md] server and the script method running in the Web browser are asynchronous. This means that methods in the control add-in interface must be of type void and property methods shouldn't be used.

  • To transfer a result from an AL trigger to the calling script method, just add a method to the control add-in interface that the AL trigger can invoke to send the result to the script.

  • To transfer a result from a script method to an AL trigger, just add an event to the control add-in interface that the script method can use to invoke an AL trigger that receives the result.

See also

InvokeExtensibilityMethod Method
GetImageResource Method
GetEnvironment Method
Control Add-in Best Practices
OpenWindow Method