D365: Implement Try…Catch…Finally in PowerAutomate


Interesting use case ..

Ajit Patra's avatarAjit Patra

Recently, we were working on a requirement to send PDF as an attachment in email on click of a custom ribbon button on Lead record. More details here:
D365: Generate Word Document using Content Control, save to SharePoint and convert to pdf usingPowerAutomate
D365: Download SharePoint document, attach to Email using PowerAutomate and AzureFunction
D365: Execute PowerAutomate from Ribbon button usingJS

As part of this requirement, we also wanted to show form notification based on the execution status of PowerAutomate whether it’s completed successfully or failed somewhere in the middle.
To achieve this, we created a custom option set field(with options In Progress, Error and Successful) on Lead entity to hold the status of execution of PowerAutomate. We tried implementing Try..Catch..Finally blocks in PowerAutomate.

Try Block: This block should contain all the core actions that PowerAutomate needs to accomplish. We used this block to update the custom option set…

View original post 382 more words

Autonumber field values in case of exception in Dynamics 365 / CRM


Recently in one of our projects, where we were using the auto number attribute (with sequential numbers), we realized that it gets incremented even in case of an exception thrown during Pre Stage of the Plugin Execution. We were assuming the number gets incremented only after the record gets created i.e. on post-stage.

But as the documentation mentions, the number gets pre-selected as soon as the record is started.

https://docs.microsoft.com/en-us/power-apps/maker/data-platform/autonumber-fields

Let us see it in action also –

Here we have the lead record created with My Autonumber as the auto number column with seed as 1000

The auto number field has a value of 1009 currently.

Now let us register a plugin on the Pre-Create stage that throws the exception.

Let us try creating a new lead record, which as expected will throw the exception.

Let us try saving the record 3 times more, triggering the record creation as well as the plugin along with the exception.

Now let us disable the plugin step and save/create the record.

As expected the record gets created, and the auto number field has a value of 1014.

The same behavior was observed in case of Pre-Validation stage.

Hope it helps..

 

Advertisements

What you might not know about FetchXML Builder


Comments, Friendly name, Filtering tables, Complex queries, OData Expression, MS Docs Access, etc.

carinamclaesson's avatarCarina M. Claesson

Recently MVP Jonas Rapp was invited by MVP Victor Dantas to the Zero to Hero show. The FetchXML Builder creator held the session FetchXML Builder from Zero to Hero. I listened in and afterwards I felt inspired to write this post to share a few tips and tricks that I had not used before.

I have been missing out and perhaps you have too?!


View original post 2,432 more words

Fixed – Sorry, we need additional information to verify your identity. Please Contact Support error while creating Dynamics 365 Trial


Recently while creating a Dynamics 365 Trial, https://dynamics.microsoft.com/en-us/dynamics-365-free-trial/, we were getting the below error, during the verification step

“Sorry, we need additional information to verify your identity. Please Contact Support”

 

 

 

 

 

 

This error could be related to the same phone number being used multiple times to create the Dynamics 365 trial or could be related browser cache.

Before trying with a new phone number, we should first try creating a trial in the In-Private mode (or clear cache in the browser).

In our case, the In-Private mode worked as shown below, and we were able to create the trial.

Hope it helps..

Advertisements

Fixed – You can’t delete this queue because it has items assigned to it – Dynamics 365 Customer Service Hub / CRM


Recently while trying to delete some of the Queue (Advanced Queue) in our case, we were getting the below error.

You can’t delete this queue because it has items assigned to it. Assign these items to another user/team, or queue and try again.

We checked and there were no queue items assigned to that queue.

Eventually what worked was to Deactivate that Queue first and then we were able to delete it.

Hope it helps..

Advertisements

Dataverse: Improve Performance using Partition Key


temmyraharjo's avatarTemmy Wahyu Raharjo

Do you know we can pass thepartitionIDparameter when doing CRUD to improve performance?The information I got from this documentation link. Today we will prove how what is the difference between using thepartitionIDand not using it.

To collect the data, I’ll run below code:

using System; using System.Web.Configuration; using Entities; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; using Microsoft.Xrm.Tooling.Connector; namespace CrmCheck { class Program { static void Main(string[] args) { CrmServiceClient.MaxConnectionTimeout = TimeSpan.FromHours(3); var connectionString = WebConfigurationManager.AppSettings["connectionString"]; var client = new CrmServiceClient(connectionString); var request = new ExecuteMultipleRequest { Requests = new OrganizationRequestCollection(), Settings = new ExecuteMultipleSettings { ContinueOnError = true, ReturnResponses = false } }; var websiteUrl = "temmyraharjo.wordpress.com"; var partitionId = "20220320"; for (int i = 0; i < 250; i++) { var account = new Entity("account"); account["name"] = Guid.NewGuid().ToString(); account["websiteurl"] = websiteUrl; var createReq = new CreateRequest { Target = account }…

View original post 339 more words