Using Azure Functions from AL
Now, we want to use our Azure Functions app to generate QR codes from Dynamics 365 Business Central. In this example, imagine that we want to add an action in a Dynamics 365 Business Central extension to generate a QR code from the Customer Card
, containing some details of the selected customer record (for example, the customer’s Home Page field).
To do that, in this extension, we create a new pageextension
object adding an action called Generate Customer QR Code
to the Customer Card
. Then, in the action code, we call a codeunit object containing the code for calling the Azure Functions.
The pageextension
object code is the following:
pageextension 50100 SDCustomerCardExt extends "Customer Card"
{
actions
{
addlast(processing)
{
action(SDQRCode)
{
ApplicationArea = All;
Caption = 'Generate Customer QR Code';
Image = BarCode...