Category Archives: Power Automate
Create and Populate Word Template Using Power Automate
Introduction: We are aware of dynamics 365 CRM’s Document template functionality. However document templates do not need XML Mapping which limit the fields that we can populate in template. SO here’s a way to use Power Automate and SharePoint and implement the Document template functionality. Steps: Create Word Template with content controls and Upload to SharePoint. Enable the Developer tab and click on Design Mode. From the available controls add the Content controls, repeating controls(For data table). Click on properties and add title, tag. Once done save the word and upload to SharePoint. In you Power Automate (You can trigger the power automate as per your requirements). Action 1: Get File Content. Site Address: your SharePoint link File Identifier: Your uploaded document template. Action2: Populate a Microsoft Word Template. Location: SharePoint Location. Document Library: Share Point Site Contents. File: Your uploaded document template. Content control: the content controls from your template will be visible here. Action 3: Create file. File Name: Should end with .docx File Content: will be the populated word template. Conclusion: Thus when your power automate runs, a Document will be created in SharePoint from the document template. It is easy to populate a Content control, to know about how to populate a repeating control- check my blog. Populate Repeating Control of Word Template using Power Automate.
Share Story :
Populate Repeating Control of Word Template using Power Automate
Introduction: Power Automate makes it easy to populate word template, we can have table (Repeating control) that can be populated using Power Automate, For information on how to create and Populate Word Template- Refer my Blog: Create and Populate Word Template Using Power Automate Steps: Create a table and add content controls for each cell. After adding content controls, select the entire row and add repeating control. In Power Automate initialize an array Variable, Use append to array action and create the table you wish to populate in the Word Template. Note: Value for the array variable will be {“title in content control properties” : “actual value”} In Action populate the word template, you will see repeating control, Change the form to accept an array input, by clicking on the symbol highlighted in below screenshot. Now Add your array as input in populate word template action. Conclusion: You can populate any of your CRM Data to Word Template by using Power Automate.
Share Story :
Terminate Power Automate Run
Introduction: In one of our recent requirements, we had Switch case in Power Automate and then actions to be done based on the variable populated in the Switch case. If any of the case was not satisfied, we did not want to the actions after the Switch case to be performed. In such scenarios, Power Automate’s Terminate Action comes in handy. Steps: Add Action terminate. It gives option to select status( this status will be shown in the run history of Flow). For status as Failed- power automate allows to add Code and Message for failure as well. We can also configure run of terminate based on status of previous action. Conclusion: Like Stop the Workflow Action for Workflows, We can have Terminate the Power Automate where we do not want any further action.
Share Story :
Create Guid In Ms Flow
Have you faced a situation where a you need to create Guid for a record while working with Power Automate?? As we all know Guid is auto generated by CRM in most cases. So in case you wan to generate a Guid using Power Automate Here is the Solution: Add compose in flow and Add guid() in expression. Output: In this way we can generate Guid in Ms flow Hope this helps !
Share Story :
[Solved] Date Field Shows Wrong Date in Power Automate
Introduction: We recently noticed the Power Automate Trigger body showing a date prior to the date selected in CRM. This behavior was not expected because the field was set to Date Only and so the time zone would not cause this problem. However, after discussion we found that : The behavior of field was set to User Local and so when this field will be set it will be seen as per the user time zone settings as Power Automate processes the Date in UTC Format. All existing date/time fields in CRM are set as User Local by default. Given below are the two approaches by which we can get the proper date in Power Automate. Approach 1: Create a new field in CRM with Format and Behavior set to Date Only. The date for this field will be correctly captured by trigger in power automate. Approach 2: Create a formula in Power Automate to add 1 day to the date coming from CRM, using add days expression. Adddays(parameter from which date is coming from, number of days to add, format of date[optional]) Eg: addDays(triggerBody()?[‘Fieldnamexyz’],1) Conclusion : The above workaround can help rectify the Date in Power Automate.
Share Story :
[Solved] Resource not found for the segment in Power Automate
Introduction: Using Common data service(Current environment) connector to create a record, if we are trying to populate lookup field we might get the below error message. Solution: When you use the current environment connector. To populate a look up field, we need to specify the plural name of the entity and then the record GUID. Eg: opportunities(GUID). If we use the below approach, we will get the error Resource not found for the segment. Use the below method to resolve the same.
Share Story :
Convert Your Complex Workflow to Power Automate with Two Easy Steps
While creating a new Background Workflow, we all have noticed the below message. Microsoft Flow( Power Automate) is a growing platform with a variety of new connectors getting added overtime. However, we all are aware that Workflows have a great capability when it came to including steps like Call Plugins, Workflow Assembly. And thus, when we think of replacing our existing background Workflows with Microsoft Flows, we might worry about losing our existing Plugin Customizations used in Workflow. So, here are a few easy steps to use all the existing Workflow steps in your Power Automate( Microsoft flow). Step 1: Create an Action. Lets take an Example: We had a workflow which triggered on When a Note was created and had the below steps: The first step Notes Collection, was Workflow assembly that was customized to send history all notes in a Tabular Format, and was something we wanted to use in Power Automate and so we created the below Action. The Action has the exact same steps as that of the Workflow. Step 2: Create a Flow with a trigger same as your Workflow trigger and call the action. Once we have created the Action, our goal is to deactivate the Workflow, and call the Action from our power Automate. To do so, we will add the below step: This step is in the Common Data Service(current environment) Connector. Since we have action that belongs to Entity Note, we will create bound action. If we have a global action, which needs no identifier we can add the step- Perform an unbound Action. Conclusion: Any Workflow that runs in background and uses Plugins or steps that you would prefer not to change but to use them directly in your Power Automate, then here’s an easy way.
Share Story :
Create HTML table & CSS using Ms Flow
Introduction: In this blog, we will see how to create html table and CSS using MS Flow. Use case : Our Project requirement is to have Invoice details in tabular form. Solution: Create HTML table : Step 1 : Select a “Select” Step in Ms flow and add the fields in the table In our case, we wanted Invoice Details in the table, hence selected “List Value” from the records in the “From”. Step 2 : add Create HTML table in the flow. Output from the above is : Apply CSS Step 3 : Add step Compose in the flow Note : Do not forget to add Output of HTML table created in the above step. Output from the above step is : I hope this helps you to create table using MS flow.
