Posts

Run Apply To Each Concurrently in Cloud flow

Image
 Introduction  The "Apply to each" condition of cloud flow runs sequentially meaning if your apply to each has 10 records, that they will be processed one after the other. This works in most cases but increases the time taken to complete the run. This will fail in case you have run a child flow or approval flow action inside the apply to each. As it is processed sequentially unless the approval flow of 1 record is completed, the second record will never run. Solution We can easily modify this behavior by turning the concurrency control on. The Degree of Parallelism is the no of records that can run at a time. The maximum limit is 50 and the default/ ideal number is set to 20.                              You can modify and save the change as per your requirement.

Date and Time expressions in Power Automate

Image
Introduction- In this blog we will walk through all date and time expressions in power automate / cloud flow Explanation- For examples we have considered input as UTC. Format is optional in most of the expressions.

Add To Time Action in Power Automate

Image
Introduction- In this blog we will understand the "Add to time" action of power automate/ cloud flow. Explanation- Add to time will add a integer number of a specified unit of time to the timestamp passed. Example- We can add 1 day/ second/minute/year/month to the passed time stamp. Syntax- addToTime('timestamp',interval,'timeUnit','dateFormat') Date format is optional. Output-  Note- This action adds the mentioned value however it does not validate the output date. There is a possibility of the output being a non existent date time value.

Merge Action in Plugin

  Introduction- In this blog we will understand the Action Merge from a Plugin (SDK message) perspective. Problem Statement: 1) We want to retrieve data once the Merge is performed on two records. 2) We want to merge 2 records using a plugin (C# code). Solution: For the first statement, We shall be triggering a plugin on the message "Merge". While using the plugin registration tool, select message as Merge. Below code is to be used-   if ( context . InputParameters . Contains ( "Target" ) && context . InputParameters . Contains [ "Target" ] is EntityReference ) {     EntityReference Master = ( EntityReference ) context . InputParameters [ "Target" ];     Guid duplicate = ( Guid ) context . InputParameters [ "SubordinateId" ];  } For the second problem statement, we will invoke/ use the Merge method. Below is the code-       var target = new EntityReference ();       target . Id = Recordid ; //master record id       tar

Merge Action in Cloud Flow

Image
Introduction- In this blog we will understand the Trigger and Action available for Merge Action in Power automate (Cloud Flow). Problem Statement: 1) We want to retrieve data once the Merge is performed on two records. 2) We want to merge 2 records using flow. Solution: For the first statement, we will be triggering a flow on Merge Action. Note- Table name will differ as per the requirement, here for example I have considered Lead. The output of the trigger is a JSON body that needs to be parsed, below is the schema.      { "type" :  "object" ,      "properties" : {          "InputParameters" : {              "type" :  "object" ,              "properties" : {                  "Target" : {                      "type" :  "object" ,                      "properties" : {                          "Id" : {   "type" :  "string" },                         

Advance Find in D365 CRM

Image
 In this blog we will try to understand Advance Find in Dynamics CRM. After you click on the funnel, a new window "Advance Find" opens up. If we select any existing view, the filter is not editable, click on Details to edit the same. Let as an example create a new view for Account Table with filter created by equals current user. Click on New or select new from the "Use Saved View" dropdown. Select the field and the filter condition Click on Results , to view records created by current user There are also a list of options/tools that we can perform on the results. Majorly used options are Run Report, Run flow, Export Data. We can also create new record or set regarding to record from here. We can go back to the query by clicking on Advance Find. Click on Save to Save the view, here we are asked for View name and description. If we edit an already existing view, we will have to click Save As to save the view as new. We can see our saved view by clicking on Saved Vi

The supplied reference link is invalid Error in Cloudflows

Image
  Introduction :  When we add a new row in dynamics CRM, we might end up using the lookup data reterived in previous action. There might be times when the previous record has returned a null. In such cases we get the error-    {    "error" : {      "code" :  "0x0" ,      "message" :  "The supplied reference link --  contacts () -- is invalid. Expecting a reference link of the form /entityset(key)."   } }     For this example; I was creating a new record and wanted to use the Account and its contact as lookup in my new record. The reterived Account did not have a contact and so my flow failed.   Solution :  Use the below if condition, if(empty(triggerOutputs()?['body/_primarycontactid_value']), ' ', concat('contacts(',triggerOutputs()?['body/_primarycontactid_value'],')'))   In this condition- we are checking if the reterived contact is empty, if yes we are setting the lookup field to blank else we