Import Sequence Number attribute in Dataverse


Import Sequence Number is an internal field (whole number), that acts as a unique identifier of the data import or data migration that created this record that ensures data consistency and traceability during data import/migration.

A screenshot of a computer

Description automatically generated

Here when we imported around 50 contact records from myFile0.csv, without specifying any value or mapping import sequence number, the system generated an import sequence number and associated it with all the 50 records created using the import.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Next, we imported 3 more records, and this time we manually specified the value for the import sequence number.

A screenshot of a computer

Description automatically generated

We could see the record created with the value we had specified.

A screenshot of a computer

Description automatically generated

Next, we again removed the import sequence number and imported it.

A screenshot of a computer

Description automatically generated

We can see the record created with an auto-generated sequence number i.e. 3

A screenshot of a computer

Description automatically generated

On manually created records from the application, we can see the value being null for it.

A screenshot of a computer

Description automatically generated

As we can see, the primary function of the import sequence number is to track which records were created during a specific import. It allows us to identify records created through import vs manually entered. It can also be used for troubleshooting if there are certain records not created during the import process. When migrating data from another system we can include a corresponding import sequence number in our source data. This can help establish a one-to-one link between the source record and the newly created record inside Dataverse, allowing better handling of failed rows.

Check out – Dynamics CRM Data Migration Tip Using the Import Sequence Number Field

Hope it helps..

Advertisements

Use Recycle Bin to restore deleted records (Preview)– Dataverse / Dynamics 365


To enable the feature, log in to

Power Platform Admin Center https://admin.powerplatform.microsoft.com/environments

Environment >> Settings >> Features and enable it

We can specify 30 days as the maximum recovery time.

Let us delete some of the contact and lead records.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Navigate to Environment >> Settings >> Data Management >> View Deleted Records to view the deleted records.

A screenshot of a computer

Description automatically generated

We can select the records and click on Restore to get the deleted records back

We can see the records removed from the Deleted Records view.

A screenshot of a computer

Description automatically generated

Below we can see the restored records – we can also see the Modified On updated.

A screenshot of a computer

Description automatically generated

The feature applies at the environment level, we cannot specify it for individual tables currently. Only the main deleted record and related records deleted via the cascaded relationship behavior will be restored. If a related record is deleted as part of custom business logic, it will not be restored.

Below let us delete the Contact record which has a case and an opportunity record associated.

A screenshot of a computer

Description automatically generated

On deleting the Case the child case and lead records also get deleted.

A screenshot of a computer

Description automatically generated

However, we do not see those records in the Deleted records list only the main (parent) Contact record.

A screenshot of a computer
Description automatically generated
On restoring the deleted contact restores the child case and opportunity record also.

A screenshot of a computer

Description automatically generated

More details on – Restore deleted records

Hope it helps..

Advertisements

Applying Modern themes to the Modern Refreshed look (app header)– Model-driven App / Dynamics 365


As we are aware the classic themes do not apply to the new modern refreshed look, however using the new modern themes at least for now we can modify the app header.

For this 1st we need to create an XML Web Resource with the below tags that apply to the AppHeaderColors tag. We can specify the colors of our choice.

A screenshot of a computer code

Description automatically generated
<AppHeaderColors
  background="#151515"
  foreground="#FFFFFF"
  backgroundHover="#A91D3A"
  foregroundHover="#FFFFFF"
  backgroundPressed="#C73659"
  foregroundPressed="#FFFFFF"
  backgroundSelected="#F05941"
  foregroundSelected="#FFFFFF"
/>

Below is our web resource created for it.

A screenshot of a computer

Description automatically generated

Next, add the Override app header colors setting definition to the solution

And for the environment value specify the schema name of the web resource.

A screenshot of a computer

Description automatically generated

Save and Publish the customizations.

Before

After

A screenshot of a computer

Description automatically generated

Get more details on modern themes

Also check out the wondeful XrmToolBox Plugin – Modern Theme Builder https://www.xrmtoolbox.com/plugins/Greg.Xrm.ModernThemeBuilder/

Hope it helps..

Advertisements

Project and Resources in different Time zones within Project – Dynamics 365 Project Operations


Came across below insightful post, while looking for details on Calendar Template / Work Template.

Advertisements

The selected system job could not be deleted. Only completed system jobs can be deleted – Delete Recurring Bulk Deletion Jobs (Dynamics 365 / Dataverse)


While trying to delete a Recurring Bulk Deletion Job we would get the below error.

“The selected system job could not be deleted. Only completed system jobs can be deleted”

The way we can delete them is first to Cancel them.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Next is to update the recurrencestarttime column value to 9999-12-31 for it.

We can use our wonderful XrmToolBox Plugin – Bulk Data Updater for it.

A screenshot of a computer

Description automatically generated

This updates the Postponse Until value in the background.

Now if we try deleting it, we will be able to delete it successfully.

A screenshot of a computer

Description automatically generated

Check for more details – https://community.dynamics.com/forums/thread/details/?threadid=b5bb6278-971c-440c-be08-d669df8c5787

Hope it helps..

Advertisements

Fixed – Action Failed: A record with matching key values already exists (DuplicateRecord)– Power Automate / Dataverse


Recently while testing one of our old existing flows, we got the below error

Action ‘Create_Child_Log_Record’ failed: A record with matching key values already exists.

{

“error”: {

“code”: “0x80040237”,

“message”: “A record with matching key values already exists.”,

“@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey”: “Plugin/Microsoft.Crm.ObjectModel.CustomBusinessEntityService”,

“@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey”: “38200c13-a28e-ee11-be36-002248933483”,

“@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey”: “1”,

“@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName”: “DuplicateRecord”,

“@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode”: “412”,

“@Microsoft.PowerApps.CDS.ErrorDetails.SqlExceptionMessage”: “Violation of PRIMARY KEY constraint ‘PK_childBase’. Cannot insert duplicate key in object ‘dbo.bew_logBase’. The duplicate key value is .”,

“@Microsoft.PowerApps.CDS.HelpLink”: “http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040237&client=platform&#8221;,

“@Microsoft.PowerApps.CDS.InnerError.Message”: “Cannot insert duplicate key.”

}

}

Basically on Create or Update of the Parent Record it was creating a corresponding child log record, recording changes in the status field of the parent record.

The issue was in the Create Child Log record step, here it was setting the Primary Key Field / GUID field of the Child Log record being created with the GUID of the Parent record.

This worked for the 1st record, but when trying to create any new record with the same parent’s GUID, it was throwing the duplicate exception as it would be the same parent GUID getting specified.

On clearing that field, and letting the system generate the GUID, the flow ran successfully.

Hope it helps..

Advertisements

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓