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 Dynamics 365 Business Central server. All calls between the AL code running on the Dynamics 365 Business Central 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
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : pendant toute l’année 2024, nous allons éliminer progressivement Problèmes GitHub comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, voir :Soumettre et afficher des commentaires pour