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

Date Window Start and Date Window End fields missing on the Work Order form – Dynamics 365 Field Service


Recently we found that in one of the environments, the Date Window Start / End Dates was not showing up on the Work Order Forms, unlike the other environments.

Check the forms below

Well, the show and hide of the Date Window Start / End Date is controlled from Field Service Settings >> Fields Service >> Agreement

Setting Pre/Post Booking Flexibility Date Field Population to Populate Date Window Start / Date Window End will unhide the fields on the form.

Below is the corresponding out-of-the-box script that shows/hides the fields.

A screenshot of a computer

Description automatically generated

Also worth noting is that these fields are deprecated, as Microsoft recommends using Time From Promised and Time To Promised fields instead to define the date window in which a job is performed.

When setting up an agreement, you can control how work order scheduling works with pre-booking and post-booking flexibility. These fields define a window of time for scheduling each work order.

There are two options for how this window is used:

  • Date Window Start/End: The agreement populates these fields with the scheduling window. This makes the “Date Window Start/End” section visible on the work order itself.
  • Time From/To Promised: The agreement doesn’t directly affect these fields, but the scheduling window is considered during the scheduling process. “Date Window Start/End” will be hidden in this case.

This setting essentially determines where the scheduling window information is stored and displayed for work orders generated from this agreement.

Get the details

Hope it helps..

Advertisements