Galleries

D365 Fin & Ops : ZIP, Compress & Archive multiple files using X++ & class ZipArchiveEntry

Requirement : The requirement is to create a zip file from a set of document entries available in document handling, creating a download link and sends the link to user browser.

In this requirement we are using Microsoft Dynamics 365 for finance and operations classes – documentmanagement, ziparchive & ziparchiveentry.

Sample Code :

class RunnableClassZIP
{
    /// <summary>
    /// Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {
        System.IO.Stream fileStream;
        System.IO.MemoryStream zipArchiveStream = new System.IO.MemoryStream();
        DocuRef docuRef;
        DocuValue docuValue;
        
        const str extensionZip = '.zip';
        const str zipFileName = 'myZipfile';
    
        using (System.IO.Compression.ZipArchive zipArchive = new System.IO.Compression.ZipArchive(
            zipArchiveStream,
            System.IO.Compression.ZipArchiveMode::Create,
            true))
        {
            while select docuRef
                join docuValue
            where docuValue.RecId   == docuRef.ValueRecId
            && docuRef.RefTableId   == 'your table id'
            && docuRef.RefRecId     == 'your rec id'
            {            
                // Creates the file entry in the zip folder.
                System.IO.Compression.ZipArchiveEntry fileEntry = zipArchive.CreateEntry(docuValue.filename());
            
                // Opens the created file entry and copies the binary file information of the original file to the file entry in the zip folder.
                using (System.IO.Stream fileEntryStream = fileEntry.Open())
                {
                    // Gets the file stream of the document attachment.
                    fileStream = DocumentManagement::getAttachmentStream(docuRef);
                    fileStream.CopyTo(fileEntryStream);
                }
            }

            // Send a download link of the created zip folder to the user.
            File::SendFileToUser(zipArchiveStream, zipFileName + extensionZip);
        }
    }

}

Enable & Disable ControlS In Power Apps

Hello Friends ,

Making a Controls (for example Text Controls, Text input, Label, Button, Dropdown Etc..) enable or disable on some conditions are very common requirement in Microsoft Power Apps.

In my example, I have a text box Control in canvas App of Microsoft Power Apps and 2 Button i.e. “Enable” & “Disable”.

Retry Policy Or Retry Counter in Microsoft Flow/Microsoft Automate

Building Resilient Applications with Retry Pattern | by Maicon Carlos  Pereira | Patrus Transportes | Medium

Many times you can faces issues related to connectivity in Microsoft Flow or Microsoft Power Automate. Connectors and Actions of Microsoft Flow like HTTP, SFTP etc. are not working properly as per your need and you are facing connectivity exceptions.

Luckily you can overcome from these issue by setting Retry Policies in Microsoft Flow or Microsoft Power Automate.

D365 FO : DOWNLOAD A SHAREPOINT FILE USING X++

Hey Folks ! I had a requirement in Microsoft Dynamics 365 for finance and operations where I want to save & download a file from a SHAREPOINT site and from its folder using X++ code. Here i am using classes –

Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider
Microsoft.Dynamics.AX.Framework.FileManagement.DocumentContents
Microsoft.Dynamics.AX.Framework.FileManagement.DocumentLocation
Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider

Restore a previous version In Power Apps

Activities, activity, back, history, previous, version, versions icon -  Download on Iconfinder

Introduction –

When i started working in Microsoft Power Apps I started to feel that I am missing source control integration with GIT or VSTS/Devops. But then i realized that Microsoft Power apps is focused on helping people build apps without code or less-code. It means that source control Integration with git or VSTS Or Azure DEVOps are not part of those near-term plans and was never a part of plan from Microsoft side,

But good thing is that you can always restore a Microsoft Power app to a previous version that was saved to the cloud from your Power Apps account.

POWER APPS – Aggregate functions [Average, Max, Min, StdevP, Sum, and VarP]

Microsoft PowerApps – What You Need To Know - Empower IT Solutions

Aggregate Functions In Microsoft Power Apps –

Syntax is FunctionName(Collection Or DataSource Or Table, ColumnName)

Average function – Calculates the average, or arithmetic mean

Max function -finds the maximum value.

Min function -finds the minimum value.

Sum function -calculates the sum of its arguments.

StdevP -function calculates the standard deviation of its arguments.

VarP -function calculates the variance of its arguments.

Introduction To MICROSOFT Dynamics 365 Customer Voice

Introduction To Dynamics 365 Customer Voice:

Dynamics 365 Customer Voice (formerly knows as Microsoft Forms Pro) is an enterprise feedback management application that enables you to easily keep track of the customer metrics that matter most to your business. It provides an easy and friction free experience from creating surveys, for generating actionable insights based on customer feedback with minimal setup time

Introduction To Microsoft Dataverse & Differences From CDS

Screenshot showing overview of Microsoft Power Platform.

Introduction – In November 2020, Microsoft renamed or rebranded Common Data Service as Dataverse. This is not first time, Microsoft is renaming and rebranding any product. For example – Microsoft Flow was rebranded as Microsoft power Automate. Dataverse (formerly knows as Common Data Service Or just CDS) allows securely store and mange data that can be used in Power Platform Products like Power Apps or other business apps.

Continue reading Introduction To Microsoft Dataverse & Differences From CDS

SQL Join In Power Apps

Power Apps Archives - Applied Information Sciences

Requirement :

In Microsoft Power Apps there are 2 collections – “Customer” & “CustomerAddress”.

“Customer” collection contain records where CustAccount is unique Key

CustAccountCustNameGenderMobile
CU-0000001DavidM9876543210
CU-0000002JamesM9876543210
CU-0000003SophiaF9876543210
CU-0000004JulieF9876543210

Try, Catch, and Finally In Microsoft Power Automate/Microsoft Flow | Error Handling Using Scope

Error handling and TRY, CATCH, AND FINALLY are very important tasks in Programing as well in any kind of development & Microsoft Power Automate or Microsoft Flow is no different.

Error handling and TRY, CATCH, AND FINALLY can be easily implemented in MICROSOFT POWER AUTOMATE/MICROSOFT FLOW for handling different different business scenarios.