Calling an Azure function from AL

Now that we have deployed our function to Azure, we can use it from the AL code in our extensions.

As we explained in Chapter 6Advanced AL Development, in the Consuming web services and APIs from AL section, we can call an Azure function with AL by using the HttpClient data type, which provides a data type for sending HTTP requests and receiving HTTP responses from a resource that's been identified by a URI.

To test our Azure function, we will create a simple extension (a new project with AL:Go!) that allows us to validate an email address associated with a customer record. Our CustomerEmailValidation extension is made up of a single codeunit object where we define an event subscriber to the OnAfterValidate ...

Get Mastering Microsoft Dynamics 365 Business Central now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.