The pageextension definition

The pageextension object extends the Item List page by adding the two actions we described previously. The object definition is as follows:

pageextension 50103 ItemListExt extends "Item List"
{
actions
{
addlast(Creation)
{
Action(Upload)
{
ApplicationArea = All;
Caption = 'Upload file to Azure Blob Storage';
Image = Add;
Promoted = true;
trigger OnAction();
var
SaaSFileMgt: Codeunit SaaSFileMgt;
begin
SaaSFileMgt.UploadFile();
end;
}

Action(Download)
{
ApplicationArea = All;
Caption = 'Download file from Azure Blob Storage';
Image = MoveDown;
Promoted = true;
trigger OnAction();
var
SaaSFileMgt: Codeunit SaaSFileMgt;
begin
SaaSFileMgt.DownloadFile('TEST.txt', 'https://d365bcfilestorage.blob.core.windows.net/d365bcfiles/TEST.txt');
end;
}
}
}
}

These two actions simply call the methods defined in our codeunit by passing the required parameters.

In the next section, we'll test the integrated solution (an Azure function being called by Dynamics 365 Business Central).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.243