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

How to – Create Administrative User Account for managing user / security roles, in Dynamics 365 / CRM


We recently wanted to create user accounts in CRM for managing users and their roles inside CRM, without accessing any of the data or functionality.

Below are the steps we can follow to achieve the same –

Login to Microsoft 365 Admin Center

https://admin.microsoft.com/#/homepage

Add a user

Temporarily assign the license to the user

In optional settings, specify either Global Admin or Dynamics 365 Administrator / Power Platform admin role.

And create the user.

Next,

Login to Power Platform Admin Center

https://admin.powerplatform.microsoft.com/

and navigate to [Environment] >> Settings >> Users

If the users is not yet synced try- https://nishantrana.me/2021/12/14/the-trick-to-force-trigger-user-sync-power-platform-dynamics-365/

Select the User and click on Client Access License (CAL) Information

Change it to Administrative and save the change.

Now back in Microsoft 365 Admin Center we can remove the license and the roles from the user’s account.

Back inside CRM the user will only have access to the Dynamics 365 – Custom app.

Inside app he gets the message No Read Privilege for data.

User will have access to following area within Settings

Inside Settings >> Security

The administrative user can see the users –

Basically when a Global or Power Platform admins having license are synced to the environment, they get the access mode of Read-Write and also System Administrator security role is assigned to them.

That is the reason why we need to change the access mode to Administrative after sync.

If they do not have license assigned, there access mode is still “Read-Write” after sync but no security roles assigned. Also the unlicensed Global and Power Platform admin will have access to the administrative areas.

Also we could create a new custom security role having access to “Security Role” table instead of assigning System Administrator or copy of system admin role.

https://docs.microsoft.com/en-us/power-platform/admin/prevent-elevation-security-role-privilege#assign-the-new-security-role-to-an-administrative-user

Get all the details here –

https://docs.microsoft.com/en-us/power-platform/admin/global-service-administrators-can-administer-without-license

Hope it helps..

Advertisements