Skip to main content

Posts

SurveyJS and PowerApps Portals [Part 4]

To call Web API we will need to call webapi.safeAjax function which accepts one argument ajaxOptions which is a standard object with properties for ajax request. Please refer the Microsoft documentation In this snippet, we are referring all the libraries required for SurveyJS to render the data and store responses provided by the user in an object (which we use to store in d365 CE tables). We have created a div element to render the form on the portal and another div element to show a customized message on the portal. In this snippet - on document.ready, we are calling a function getSurveyData() to render the data on to the portal, initializing the methods (out of the box in SurveyJS) to capture the data on Complete button click and Next page button click on the form. To render the data, we are making a Web API call to the Dynamics from PowerApps Portals and passing that JSON object into Survey object. Refer SurveyJS documentation for more details. In this snippet - we have created me...

SurveyJS and PowerApps Portals [Part 2]

   Dynamics 365 CE [to host the forms data] For this scenario, we have created below Table and Column components. Table -  Forms Payload Columns -  SurveyJS Payload  and  SurveyJS Response SurveyJS Payload:  column to store the JSON object of an assessment form. SurveyJS Response:  column to store the responses provided from the PowerApps Portals. We use the JSON object available in the "SurveyJS Payload" column from the PowerApps Portals using Web API to generate SurveyJS form to provide responses by the end user. SurveyJS and PowerApps Portals [Part 3]

SurveyJS and PowerApps Portals [Part 1]

  SurveyJS   is an open-source survey and form library for JavaScript that allows you to create customizable surveys and forms for collecting user feedback or data.   SurveyJS   provides a simple and intuitive way to design and manage surveys and forms using a variety of question types, such as multiple choice, rating, dropdown, and text fields. SurveyJS  would be a good tool to reply upon when it is needed to create assessment forms/ feedback forms from Dynamics 365 CE and PowerApps Portals. In this post, let us see how to leverage  SurveyJS  in PowerApps Portals without any APIs.  No major pre-requisites are required, except basic understanding of PowerApps Portals  and jQuery. Get Started: Create a Web Page in PowerApps Portals. Create a Page Template in PowerApps Portals. Create a Web Template in PowerApps Portals. Create a Web Template in PowerApps Portals: Open the "Portal Management" app from Apps section on the left navigation at http...

SurveyJS and PowerApps Portals [Part 3]

  Web Template implementation- to generate and capture Assessment Forms from Dynamics Table created in the 2nd part of this topic.    Go to the Web Template created in the 1st part of this topic and paste the below snippet into it <script>     ( function ( webapi , $ ){             function safeAjax ( ajaxOptions ) {                 var deferredAjax = $ . Deferred ();                         shell . getTokenDeferred (). done ( function ( token ) {                     // add headers for ajax                     if (! ajaxOptions . headers ) {                         $ . extend ( ajaxOptions , {                     ...

Get old SharePoint Files using Power Automate efficiently

In this post, let us see how can we get the old files from a SharePoint Folder using Power Automate. In this example, I am considering a simple approach and this can be extended based on the requirement. To ensure the Power Automate is simple, efficient and the performance is optimized - we are not using ForEach control to loop through and identify old file or item.  We use " Send an HTTP request to SharePoint " in the Power Automate and query the data using OData filters and order by.  The idea here for the faster retrieval - selecting only a required set of fields from the file. Steps to achieve this: Login to https:make.powerautomate.com . New Cloud Flow -> Scheduled Or Instant (based on the requirement). (Configure the Start Date and Time. For repeat, every, configure the seconds/ minutes/  hours/ day/ week/ month) Click on Create Button. Click + icon to add new action. Search for SharePoint and select  " Send an HTTP request to SharePoint " Select the re...

Create an application user in Common Data Service/ D365/ Microsoft Dataverse

In this blog let us see Application Users in Microsoft Dataverse.  Microsoft introduced a concept called "Application Users" to connect to the D365 or Microsoft Dataverse from client application with better security and control over the access to the third parties. Before introducing "Application User", to connect Dynamics data we used to leverage licensed user account using Username and passwords. Refer the blow URL for details on the Application User setup and it's utilization. https://mspowerassist.blogspot.com/2021/05/how-to-connect-to-multi-factor-enabled.html

How to Connect to Multi-Factor Enabled Microsoft Dataverse using C# (V9.2)

As per Microsoft,  the  WS-Trust  authentication type that is used by custom clients to connect to Dataverse is deprecated. This change applicable to the client applications which tries to connect to Microsoft Dataverse. This helps developers to connect to Microsoft Dataverse with more security and protect access to the application as per the business requirement. So, in order to connect to Microsoft Dataverse, we can leverage Azure Active Directory. Microsoft Reference on the WS-Trust authentication Type Changes Pre-requisites: App Registration in Azure Portal . Create an Application User in Dataverse. Consume the Application Registration details in Console Application Application Registration in Azure Portal: Log in to Azure Portal Go to "Azure Active Directory" --> "App registrations" --> New registration Provide a Name, Choose respective "Supported account types" (first option would work for the users in same tenant) Click on "Register"...

How to create a Folder in OneDriveforBusiness

In this post let us see "How can we create an Empty Folder in OneDriveforBusiness" using SharePoint HTTP Action. As we do not have out of the box action to create Folders in OneDriveforBusiness - we can leverage "Send  an HTTP request to SharePoint" Pre-requisites: OneDriveforBusiness URL Folder Name to create Eg: https://{domain}-my.sharepoint.com/personal/{username}/_layouts/15/onedrive.aspx Steps: Go to  Microsoft Power Automate | Microsoft Power Platform  -> Sign in Select the respective Environment Click on "Create" -> Instant Flow -> provide a name to the flow name choose "Manually trigger a flow" Add an input to the trigger and name it as "folderName" Add an action -> "Send an HTTP request to SharePoint" Click on "Add a custom item" and enter the OneDriveforBusiness URL and update the action with below parameters

How to embed an image in an email | Power Automate

In this post let us how to embed an image in an email using Power Automate In order to embed an image in an email - it would be easy if the image is stored in OneDrive or SharePoint folder and retrieve them. Let us see how to accomplish this... Create a folder in OneDrive for Business Upload an image to embed in email Now, let us create flow. Add a trigger Add a variable (this helps us to form the image tag to embed in email) Add OneDrive for Business connector and chose "List files in folder" Add "Get file content" and File field add - "Id" from the above action Now add "Get File Content" action from OneDrive for Business connector Under File field - select "Id" from the dynamic content Apply to each automatically applies when you add "Id" into File field. Now add "Set Variable" and update it's Value as <img src="data:image/png;base64, @{body('Get_file_content')?['$content']} " alt=...

How to create a Nested Flow | Power Automate | PowerApps

In this post, let us see how to implement " Nested Flows " in Power Automate.  Some use cases: To create a common logic and make use of "Run a Child Flow" action To perform actions on the database without providing access to the end users. Let us create records in SharePoint (using Student Name and Email fields in this post)  without providing access to the end users using nested flow concept. To proceed, we need to have two flows created.  Parent Flow (which triggers the child flow) Child Flow (nested Flow) Go to flow.microsoft.com, log in and select respective environment from the drop-down. Click on "+ Create" Choose "Instant flow" Provide a name and choose " When an HTTP request is received " and "Create" Now, we need to provide inputs to the flow (inputs from the Parent Flow) We need to generate Schema for " When an HTTP request is received" trigger Click on "Use sample payload to generate schema" and...

Validate an email input in a Canvas Application | PowerApps

Validate an email input in a Canvas Application | PowerApps In this post let us see, how to Validate an email input in a Canvas Application UI Validations helps us to ensure, valid data is received from the End User to complete an operation helps end user to provide right information the validation action depends on the type of the input control for Text Input Control - mostly we go with "OnChange" for check box control - "OnCheck and On uncheck" for Drop Down and Combo Box Controls - "OnChange" or "OnSelect" etc., Now, let us see how can we validate an email input, a phone number input and a name input. How to validate an email input value is valid? We can leverage "Regex" (Regular Expressions) to valid user inputs. Let us consider the Email Input Control Name as -  txtEmail.Text. OnChange of this Control let us i...

How to create a "pop-up box" in PowerApps

in this post, let us see how to create a Pop-Up in Canvas App required controls: rectangular icon label buttons - 2 take a "rectangular icon" and make it screen size update it's "Fill" - with RGBA(175, 191, 224, 0.5) . Take another "rectangular icon" and adjust it to center Take "label" - and add required text (Eg: "do you want to proceed?") Take two buttons. Update text of Button1 to "OK" and other to "Cancel" On Click of the respective control (to open the pop-up), add this expression : UpdateContext({locOpenPopup:true}) select "cancel" and "ok" button and add UpdateContext({locOpenPopup:false}) on "OnSelect" property. add appropriate actions on "cancel...