How to – Use SetAutoNumberSeed Action to reset/update the seed for the Autonumber attribute – DataVerse (Dynamics 365 / CRM)


Suppose we have the following Autonumber field created with

Seed value1000 and Format{SEQNUM:4}

Now based on a certain requirement, we want to dynamically / programmatically update / reset the seed value.

For this, we can make use SetAutoNumberSeed Action

Below we can see the auto number set as 1007 on creating a new contact record.

Now to set it back to 1000 we can run the following code –

On executing the action, we can see the next contact record having autonumber field set as 1000.

Another example –

On updating the value to 888, and creating a new contact record

Sample code –

                OrganizationRequest customActionRequest =
                    new OrganizationRequest("SetAutoNumberSeed");

                // name of the entity
                customActionRequest["EntityName"] = "contact";

                // attribute's schema name
                customActionRequest["AttributeName"] = "cr59f_myautonumber";

                // the value we want to set
                customActionRequest["Value"] = Convert.ToInt64(888);

                OrganizationResponse customActionResponse = 
                    svc.Execute(customActionRequest);

Check other posts –

https://powerobjects.com/tips-and-tricks/auto-number-d365-version-9/

Hope it helps..

Advertisements

Couldn’t add resource. Microsoft Dataverse is in use error in Dynamics 365 Customer Insights


We might get the below error while trying to add Microsoft Dataverse Data source in Dynamics 365 Customer Insights.

“Coundn’t add resource. Microsoft Dataverse is in use”

As the error message indicates, this is because we have an already existing data source connected to that same organization.

We can edit the Data Source and can add entities to the same connection.

also delete the data source, if its entities are not used in Match and Merge

else we will get the below error message.

“To proceed, remove its entities from: Match, Merge”

In this case we will have to remove the entities from any Merge and Match configuration first.


Hope it helps..

Advertisements

How to – Import Data from Dataverse / CRM to Dynamics 365 Customer Insights


In the last post, we had set up the trial version of Dynamics 365 Customer Insights.

https://nishantrana.me/2022/01/26/how-to-set-up-dynamics-365-customer-insights-trial/

Currently, our trial instance has no data.

We can ingest data into Dynamics 365 Customer Insights from Microsoft Dataverse either using Microsoft Power Query (Dataverse Connector)

or Microsoft Dataverse import method.

The Microsoft Dataverse import method doesn’t copy the data into the Customer Insights / Audience Insights Data Lake, however, it doesn’t allow for Extract, Transform, Load (ETL) as in the case of Microsoft Power Query data source.

Select Audience Insights >> Data >> Data Sources >> Choose your import method – Microsoft Dataverse

Provide a name to the data source and click on Next.

Enter the Server address, Sign in, and click on Next.

Select the Entity, here we have selected the contact entity for now.

We can see the data source is being refreshed.

We have the option of stopping the refresh.

We are having 100 records in our contact entity inside CRM.

It took around 5 hours for the refresh to complete successfully.

We have the option of Edit, Refresh and Delete on the Data Source after the successful refresh.

We can see the contact entity available within Data >> Entities section

Clicking on contact, we can see the Attributes used and Data in it as well as the option to download the data.

The download will be downloading the first 100K records.

Now when it comes to creating a unified customer profile through (MMM) i.e. mapping, matching, and merging, it requires a minimum of 2 entities to be there, to generate the Customer Profile.

In the next post, we will import some sample contact data from a local excel file and use it for further configuring our customer profile.

How to – Import Data from local data files to Dynamics 365 Customer Insights

How to – Unify (Map, Match and Merge) Entities in Dynamics 365 Customer Insights

Hope it helps..

Advertisements

Solved – Flow run timed out. Please try again in Power Automate (Microsoft Flow)


While testing one of the flows which was having “Do until” action in it, we ran across the below error.

Error – Flow run timed out. Please try again.

However, while navigating to the run history we can still see the flow running, and has run for over 30 minutes. That’s the default behavior.

Refer to this – https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-run-timed-out/m-p/713628#M58900

Hope it helps..

Advertisements

How to – manage who can create environments in Power Platform


Through the Power Platform admin center, the administrator can control who can create an environment in the Power Platform.

Click on Gear Icon >> Power Platform settings

There we can specify who can create production and sandbox environments & trial environments.

Let us set it as Only specific admins and save the settings.

With this particular setting now only the following admins will be able to create environments.

Global admin, Dynamics 365 Admin, and Power Platform admins.

The non-admin user will get the below error

Your tenant’s administrators have disabled trial environment creation for non-admin users. You need permission to create a trial environment in your tenant

In case of Everyone, the below license determines who can create environments.

https://docs.microsoft.com/en-us/power-platform/admin/create-environment#who-can-create-environments

Hope it helps..

Advertisements

How to – change user’s business unit without removing the security roles in Dynamics 365 / PowerApps (EnableOwnershipAcrossBusinessUnits setting)


When we change the user’s business unit, all the current security roles of the users are removed and we need to assign the roles again to the user. This has always been the default behavior. 

Also check – Modernize Business Units –  https://nishantrana.me/2022/01/04/modernize-business-units-matrix-data-access-structure-record-ownership-across-business-units-preview-in-dynamics-365-dataverse/

For E.g. below user User 2 belongs to Business Unit – BU 1 and has the following security roles assigned.

Now changing the user’s business unit to BU 2

will remove all his security roles assigned.

We can now override this behavior by updating the new option /setting added

DoNotRemoveRolesOnChangeBusinessUnit(this property determines if roles are removed when the principal changes business units) through the
Organization Settings Editor tool

After we have installed the managed solution, we can update the setting and set it as true

Let us assign the security roles to User 2 in BU 2.

Let us now change the BU of user 2 back to BU 1.


As expected after updating that setting – DoNotRemoveRolesOnChangeBusinessUnit– as true – we can see the security roles still intact, even on the change of Business Unit for the user.

What happens if user 2 is assigned a security role – BU2 Security Role, which is created in BU 2 Business unit and is not available in BU 1.

Let us change the business unit to BU 1.

As expected BU2 security role is not available in BU 1, so that role is not assigned, only the common security role coming from parent BU remains intact.

Hope it helps..

Advertisements