{Step by step} Restore deleted Power Automate flow from the environment.

Requirement:

If you have accidentally deleted a Power Automate flow from your environment, you may be able to restore it if you have a backup or if it is still available in the Recycle Bin, if you have a backup of your environment that includes the deleted flow, you can restore the environment to an earlier state to retrieve the flow.

Implementation:      

  • Give a title to your flow.
  • Select the “Manually trigger a flow” trigger.
  • Click on “Create.”
  • Add an action by clicking on “+New step.”
  • Search and select the “Power Automate Management” connector.
  • Now select the “List Flows as Admin” action.
  • Select the environment from which you want to restore the flow.
  • Save and test your flow.
  • After testing the flow, check the output of an action.
  • You will find the list of all the flows created in your tenant.
  • Note down the “name”, which is GUID of your flow.
  • Now click on “Edit” > “+New step.”
  • Add the “Restore Deleted Flow as Admin” action from the Power Automate Management Connector.
  • Select environment.
  • In Flow, enter the Guid noted in the earlier step.
  • Save and test the flow.
  • Flow will be restored in a disabled state.

[Note: Flows can only be restored within 20 days.]

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Steps by Step}Embed a Power Virtual Agents bot in Canvas App

In this blog, we will learn to embed a Power Virtual Agents bot in Canvas App.

Requirement:

Adding Power Virtual Agents chatbot into Canvas App, Power Virtual Agents bot can handle multiple conversations simultaneously, which means it can scale up to meet increased demand without requiring additional resources.

Implementation:

Firstly, we need a bot, to create a bot follow these steps.

  • Go to https://make.powerapps.com.
  • Sign into power apps.
  • Click on the “Power Platform” from the left navigation panel.
  • Select “Power Virtual Agents.”
  • You can use the old chatbot also.
  • Click on “Create“, then select “Try the unified canvas (preview).”
  • Give a title to your chatbot.
  • Click on “Create” button.

After creating a bot, we need to enable the Power Apps component framework feature.

  • Go to the Power Apps portal.
  • Click on the gear icon on top right corner and select “Admin Center.”

  • On the left pane, select “Environments, select the environment where you want to enable this feature, and then select “Settings.”
  • Expand “Product” and select “Features.”
  • Turn on “Power Apps component framework for canvas apps,” then select “Save.”

Now we need a solution that consists of “IFrame” exists.

  • IFrame will hold Canvas App and bot together.

Now create a Canvas App or open the existing one.

  • Click on the “Tree view” from the left pane.
  • Now go to the “Components” and click on three dots.
  • Select “Import components.”
  • Click on “Code.
  • Select “IFramePCF” component.
  • Click on “Import.”
  • IFramePCF is now displayed under components.

Now add a new screen where you want to put a Chat bot.

  • Click on “insert.”
  • Select “IframePCF” from the code components.

Now, Go to the “Chatbots” in Power Apps portal.

  • Select your Chatbot.
  • And select “Edit.”
  • Go to the “Setting” in the left pane.
  • Select “Channels
  • Now select “Mobile App.”
  • Under Embed code, copy the ‘src’ section only (highlighted below): 
  • Now, Go back to the Canvas App.
  • Select “IFramePCF” component from tree view.
  • And click on “Advance.”
  • Paste the URL from the bot copied in the “src.”
  • Save and publish.

Output: Chatbot is now uploaded on Canvas apps.

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Step by step} Retrieve more than 5000 records using Power Automate Pagination.

In this blog, we will learn how to retrieve more than 5000 records using Power Automate.

Requirement:

Dataverse is a powerful platform for managing data, and Power Automate is a great tool for automating business processes that involve Dataverse. However, there are some limitations to how much data can be retrieved from Dataverse at one time, by default, Dataverse limits the number of records that can be retrieved in a single query to 5000.

Implementation:

  • Give a title to your flow.
  • Select the “Manually trigger a flow” trigger.
  • Click on “Create.”

Now add some actions.

  • Click on “New step,” and search for “Initialize variable.”
  • Select “Initialize variable” and rename it.
  • Write “Record name” in the name.
  • Select “Integer” in type.
  • And put “0” in the value.

We are adding this “Initialize variable” to get the total record count.

  • Add one more variable.
  • Click on “New step,” and search for “Initialize variable.”
  • Select “Initialize variable” and rename it.
  •  Write “Page number” in the name.
  • Select “Integer” in type.
  • And put “1” in the value.

This variable will help to send the next page number on the request.

Now create a do-until loop to run until the page Number is 0.

  • Add dynamic content of “Page number” in value.
  • Click on “Add an action.”
  • Search and select “Scope.”
  • Again, click on “Add an action.”

Scope will define your fetch criteria to retrieve the records from Dataverse.

  • Search for “List rows.”
  • Select the “List rows” action of Microsoft Dataverse.
  • Select an entity, here we have selected “Contacts.”
  • Add fetch XML query.
  • In the fetch Xml query, add dynamic content of the “Page Number” variable.
  • Add a condition.
  • Write this expression in condition.
    • “length(outputs(‘List_rows’)?[‘body/value’])”

Here, we are adding a condition to check if the list rows length is still greater than 0.

If yes, increment the length of the Page Number.

  • Click on “Add an action.”
  • Search for “Increment variable.”
  • Select “Page Number” in the name option.
  • Add “1” in value.
  • Add a “Scope” action under “Increment variable.”
  • Now add one more “Increment variable” in “scope.”
  • Select “Record Count” in the name option.
  • Write this expression in value.
    • “length(outputs(‘List_rows’)?[‘body/value’])”

If no, Set Page Number as 0.

  • Add “Set variable.”
  • Select “Page Number” in the name option.
  • Set “0” in value.
  • Add a “Compose” action.
  • Now add a dynamic content of “Record Count.”
  • Save the flow and run it.

Output:

Using Power Automate, we can retrieve more than 5000 records with Pagination, this flow runs two times, on the first run it retrieves 5000 records, and 2100 records on second run.

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Step by Step}Passing parameters to Power automate from Canvas App.

In this blog, we will learn how to pass parameters to Power automate from Canvas App.

Requirement:

While working with Canva App, many times we come across a situation where we need to perform some operations through Power Automate, In this blog, we will learn how to pass the parameters to Power automate from Canvas Apps by calling a Power Automate flow, passing parameters to the flow.

Implementation:

  • Go to https://make.powerapps.com.
  • Sign into power apps.
  • Click on “Apps” from the left navigation panel.
  • Open a Canvas app, if want you can create new one.
  • In Canvas app.
  • Click on “Insert.”
  • Add “Text input‘ and “Button” to screen.
  • Click on the power automate from left panel.
  • Click on “Create new flow.”
  • Create a new flow by clicking on “Create from blank.
  • Click on the “New Step.”
  • Search for “Initialize variable.”
  • Select “Initialize variable.
  • Rename step by “Email.”
  • Select “String” in type.
  • In value field add dynamic content by clicking on “Add dynamic content.
  • Click on “Ask in PowerApps” to get an dynamic content.
  • Select “Email_Value” to get the email address which you will enter
  • Add a new step.
  • Search for “Outlook.”
  • Select “Send an email (V2).”
  • In this step add a dynamic variable content in “To.”
  • Add dynamic content by clicking on “Add dynamic content.
  • Select “varEmail.”
  • Add text value in “Subject” and “Body.”
  • Save flow and test it.
  • Now go to the Canvas app.
  • Click on the button which you have added before.
  • On the “OnSelect” property on button add this function.[‘Sendemailswithparameters’.Run(TextInput1.Text)]
  • Save and publish your app.
  • Now play your app.
  • Add Mail id and test your flow.

Output:

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Step by Step}Share record with a user using Unbound action in Power Automate

Requirement:

In this blog, we will learn how to share records from Microsoft Dataverse to a user with the help of using an Unbound action in Power Automate, In Power Automate, an unbound action is a type of custom action that is not associated with a specific entity or record in a Dynamics 365 environment. It is a standalone action that can be called from any workflow or automation.

Implementation:

  • Go to https://make.powerapps.com.
  • Sign into Power apps.
  • Click on “Flows” from the left navigation panel > “+New flow.”
  • Select “Automated cloud flow.”
  • Give a title to your flow.
  • Search for the Microsoft Dataverse trigger “When a row is added, modified, or deleted.”
  • Select the Microsoft trigger.
  • Click on “Create.”
  • Select “Added” in the Change type.
  • Select an entity, we have selected an “Accounts” entity here.
  • Select “Organization” in the scope field.
  • Click on “+New step” for adding action.
  • Search for “Perform unbound action.”
  • Select Microsoft Dataverse action “Perform an unbound action.”
  • Select “GrantAccess” in the action name field.
  • In the target field enter entitylogicalname-plurarl(recordid) or entitylogicalname-plurarl/recordid.
  • You can add the dynamic id of the entity, we have added a dynamic id.
  • PrincipalAccess includes the user or team to which access will be provided and the Access Mask for the Privilege, in JSON format.
  • Click on “+New step.”

Tips: In this blog, we gave an access to user, for giving an access to team use the code given below.

Principal access for team.

{
"Principal:"
{
"teamid":"",
"@@odata.type":"Microsoft.Dynamics.CRM.team"
},
"AccessMask":"ReadAccess"
}
  • Search for “Initialize variable.
  • Select “Initialize variable.”
  • Write “At” in the Name field.
  • Select “string” in the type field.
  • Write “@” in the Value field.
  • Click on “+New step.”
  • Search for “Compose.”
  • Select “Compose.”
  • Add PrincipalAccess JSON for sharing user.
  • Use the dynamic id of “At” instead of using “@.”

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Step by Step} Send an email on click of Canvas App button using Power automate:

Requirements:

In this blog, we will learn how to send an email on the trigger of a button in the Canvas app by using Power Automate.

Implementation:

  • Go to https://make.powerapps.com.
  • Click on “Apps” on the left navigation panel.
  • Select “Canvas.”
  • If you do not want to create a new Canvas app, you can use the old one.
  • Give a title to your Canvas app.
  • Select any layout, here we have selected a “Tablet” layout.
  • Click on “Create.”
  • Click on “Insert.”
  • Now add a “Text label” and change the text value to “Send an email.”
  • Place this text label at the top for creating a Header.
  • Add 3 more “Text labels” and place them vertically.
  • And change their names to “To,” “Subject,” and “Body.”
  • Add 3 “Text inputs” and place them parallel to “Text labels.”
  • Rename “Text inputs” and “Text labels” from the tree view on the left pane.
  • And remove the default value from the “Text inputs.”
  • Change the display mode of “Bodyinput” (text input) “single line” to “Multiline.”
  • Click on “Insert.”
  • Select “Button.”
  • Change the button name from the tree view in the left navigation pane.
  • Change the text properties of the button to “Send” from the properties pane on the right.
  • Let’s create a Power automate.
  • Go to https://make.powerapps.com.
  • Sign into power apps.
  • Click on “Flows” in the left navigation panel > “+New flow.”
  • Select “Instant cloud flow.”
  • Give a title to your flow.
  • Select “PowerApps.”
  • Click on “create.”
  • Now, we will trigger the flow from Canvas app.
  • Click on “+ New step.”
  • Search “Send an email” in the new step.
  • Select “Send an email(V2).”
  • Here, we are using office 365 outlook for sending emails.
  • In the next step Click on “To.”
  • And add dynamic content.
  • Click on “Ask in power apps” it will automatically fill dynamic content in the “To” data card.
  • Now click on “Subject” > “See more” > “Ask in power apps.”
  • It will suggest dynamic content for the “subject.”
  • Do follow the same step for “Body.”
  • Your flow will look like this and save your flow by clicking on “Save.”
  • Let’s connect this Canvas app to power automate.
  • Click on the “power automate” on the left navigation panel in Canvas app.
  • Then click on “+Add flow.”
  • Select the flow which we have created.
  • Click on the button, and write this function on the “OnSelect” property of a button.

Sendemail.Run(ToInput.Text,SubjectInput.Text,BodyInput.Text);Reset(BodyInput);Reset(ToInput);Reset(SubjectInput)

  • Save and publish.

Hope it helps!  

Power 365ing as usual!  

Any problem in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual?  

Problem Area – Technical, Functional, Training, Development, or consulting?  

Me and my team are here to assist, please fill the following form for your business needs: Click here  

About the Author:

{Step by Step} Create a waffle sliding menu panel in the Canvas app

In this blog, we will learn how to create a waffle sliding menu in Canvas app.

Requirement:

Creating a waffle navigation menu for easy accessibility of features and navigating other screens.

Implementation:

  • Sign into Power apps.
  • Create a Canvas app.
  • Go to insert and add a timer.
  • Select the timer and go to “Advanced” in the properties pane, On start switch “false” to “VarTimer”.
  • Change the duration of the timer from “6000” to “150”.
  • Add a “Waffle menu” icon.
  • And “OnSelect” of icon properties. UpdateContext({VarTimer:false});UpdateContext({VarWaffle:!VarWaffle,VarTimer:true})
  • This will start and stop the timer with the waffle menu.
  • Let’s create a flyout panel.
  • Add a rectangle and place it on the waffle menu.
  • On the “X” properties of waffle menu=If(VarWaffle,-115,-115+115*(WaffleTimer.Value/WaffleTimer.Duration))
  • Here we can see that the panel is on the left side of the screen.
  • Add one more waffle and on the “OnSelect”= UpdateContext({VarTimer:false});UpdateContext({VarWaffle:!VarWaffle,VarTimer:true})
  • And on the “X” property of the waffle menu paste the same value of the flyout rectangle’s “x” value.
  • Add buttons or icons in the flyout rectangle with the same “X” value as the flyout rectangle.
    • If(VarWaffle,-115,-115+115*(WaffleTimer.Value/WaffleTimer.Duration))
  • Save and publish.

Output:

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

{Step by step}Searchable drop-down in Canvas app

In this blog, we will learn about “Combo box” feature in Canvas app.

Requirement: Creating a search option with the drop-down, for searching items in the list easily just by typing and searching rather than scrolling.

Link to Microsoft docs: shorturl.at/epvNW

Solution:

  • Open Canvas app.
  • Click on insert and select the combo box.
  • Click on combo box and go to the “Advanced” option in the properties pane.
  • Search “ IsSearchable” and switch it to “ true”.
  • Here we are using default data of “Combo box”.
  • Search “SelectMultiple” and switch it to “false”.
  • Search “InputTextPlaceholder” and define what you want to display in the drop-down.
  • Save and publish.

Outcome:

Hope it helps!  

Power 365ing as usual!  

Any problem in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual?  

Problem Area – Technical, Functional, Training, Development, or consulting?  

Me and my team are here to assist, please fill the following form for your business needs: Click here  

{Step by Step} Apply Power-FX Preview Formula Feature 

In this blog, we will learn about a new Power FX preview feature.   

Business requirement: To find difference between two dates by using “Formula” Data type. 

Follow this link to see “Formula” option as a data type.  

Link. (https://make.preview.powerapps.com/) 

After using this link, select the table where the “formula” data type is to be used. 

Here, we have created a table named as “Custom Table”. 

Now, we will add new column named as “Total Days” inside the table and select the data type as “Formula.” 

Also, we must already have created two date time columns “start date” & “end date.” 

  • Formula for Date Difference: 

DateDiff(new_startdate,new_enddate) 

Now, we must add this formula in “Total Days” field inside Formula section.

After that, we must Add columns to main form. And click on save to publish the outcome. 

Let us see what will happen! 

Hope it helps!  

Power 365ing as usual!  

Any problem in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual?  

Problem Area – Technical, Functional, Training, Development, or consulting?  

Me and my team are here to assist, please fill the following form for your business needs: Click here  

About the Author:  

{Quick Tip}Enabling custom plugin error messages to the PowerApps Portal page in D365

In this blog, we will learn about How to throw a custom error message in the PowerApps Portal page in D365.  

Sometimes when we are working on the PowerApps Portal, and we want to show some custom error message by using a Plugin based on some business logic, we will get a generic error message which is not useful to the end user that will say “An unknown failure has occurred. Error ID …” as shown in the fig. Given below : 

So, we will display the custom error message error with the help of the site setting in PowerApps portal. The steps are as follows: 

  • Firstly, Go to Apps > Portal Management  
  • Go to Site settings > New 

So, let us see what will do. 

Name - Site/EnableCustomPluginError 
Website – Whatever you have like Partner Portal, Customer Self-Service, etc… 
Value – true 

  • Then, Save & close.  

And go to portal > Sync Configuration and click on Browse Website. 

Let us see what happens! 

So, you will see the custom error message on the screen. 

Hope it helps!   

Power 365ing as usual!   

Any problem in Power Platform or Dynamics 365 – end user, Microsoft partner, or an individual?   

Problem Area – Technical, Functional, Training, Development, or consulting?   

I and my team are here to assist, please fill out the following form for your business needs: Click here   

About the Author: