Create basic Azure functions

Completed

To create a new Azure Functions app, you must have an active Azure subscription. To test and try out Azure services, you can create an account that gives you a credit to explore Microsoft Azure for 30 days.

Go to the Microsoft Azure home page to create your account. You will need a Microsoft account to sign up.

After you have created an Azure subscription, you can go to the Azure portal. This portal is the central management tool where you can create and manage all your Azure services. When you have signed in, you can create a function app.

Screenshot of the Azure portal and services page.

Select Create a resource and search for Function App. Select your Azure subscription and a resource group or create a new one. Provide a name for your function app. This name will be the prefix for the URL (for example: yourfunctionapp.azurewebsites.net). You can select the .NET Core runtime and the region that matches your location. Select the Review + create button.

Screenshot of the Function App Basics window.

Now, you can start creating new functions. A function app can contain multiple functions. Each function will be available on:

https://yourfunctionapp.azurewebsites.net/api/<functionname>.

To add a new function, select the plus (+) icon. Select the type of trigger for your function. For Business Central, select the HTTP Trigger, and then your code will be run when it receives a request through HTTP. You can use the HTTP data types in AL.

Screenshot of the Azure functions overview page.

When you create an HTTP Trigger app, it is populated with some default code. This code accepts an HTTP request through a GET or a POST method. If a query parameter exists with the key name or a JSON document is posted with a key name, the function will return Hello name.

You can start by writing your own C# code that performs an action based on the HTTP request and sends a response to the requester. You can create an image processing function or a function that returns a QR code. You have the .NET Framework available to help you create small functions. You can create functions in C#, Java, or Python, but not in AL.