New features added in Grid– Dataverse / Dynamics 365


With Release Wave 2, we can see the below features added to Grid.

The option to Group By, Column Width, Move Left and Move Right.

A screenshot of a computer

Description automatically generated

Group By (Rating) –

A screenshot of a computer

Description automatically generated

Move Left and Move Right as expected will move the selected column accordingly. Not only that we can also Drag and Drop the columns, here we have dragged the Rating column as the 1st column.

A screenshot of a computer

Description automatically generated

Column Width – allows us to specify the preferred width of the column.

A screenshot of a computer

Description automatically generated

Totals > None, Average, Maximum, Minimum, Sum.

For the numerical column, Annual Revenue in this case we get the option to calculate the total

A screenshot of a computer

Description automatically generated

Selecting Total > Sum, adds a row at the bottom, showing the total sum

A screenshot of a computer

Description automatically generated

Similarly selecting minimum shows the minimum value.

A screenshot of a computer

Description automatically generated

Hope it helps..

Advertisements

Update Modified On (modifiedon) date of existing records – Dynamics 365 / Dataverse


Recently we had a requirement to update the modifiedon date of a few of the records of notes table.

The we can achieve this is by implementing an update plugin on preoperation.

Below is our test record

Below is our plugin on the preoperation update to update the modifiedon date.

A screenshot of a computer code

Description automatically generated
A screenshot of a computer

Description automatically generated

On updating the note record, we can see the modifiedon date updated as shown below.

A screenshot of a computer

Description automatically generated

Below are some other records where we have modifiedon updated (test records)

A screenshot of a computer

Description automatically generated

As we had multiple records to be updated on production, eventually we updated the plugin step to be triggered on the update of langid attribute (which won’t be updated by users) and used the awesome XrmToolBox Plugin – Bulk Data Updater to perform touch on langid field. This is to make sure it doesn’t get triggered on the creation or update of any existing records unless explicitly triggered from the Bulk Data Updater for that field and than disabled the plugin.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Check below articles –

https://debajmecrm.com/createdon-createdby-modifiedon-and-modfiedby-all-you-need-to-know-to-maintain-history-during-data-migration-in-dynamics-365/

https://rajeevpentyala.com/2017/11/18/set-created-on-created-by-modified-on-modified-by-fields-using-sdk-data-import-plug-in-dynamics-365/

https://nishantrana.me/2018/10/16/using-overriddencreatedon-or-record-created-on-field-to-update-created-on-field-in-dynamics-365/

Hope it helps..

Advertisements

Enable Copilot for the Rich Text Control – Dataverse / Dynamics 365


To enable Copilot for a specific instance of a Rich Text editor field, we first need to create a Web Resource where we need to specify the property we want to update/override as specified in the RTEGlobalConfiguration_Readonly.json, the base read-only configuration file for the Rich Text editor control.

We have created a JavaScript Web Resource file named rtecustom.js.

Added the copilitrefinement and CopilotRefinement values to the extraPlugins and toolbar properties existing values as shown to enable copilot.

Refer to the sample configuration file for all the properties and their corresponding values.

A screenshot of a computer program

Description automatically generated
{
  "defaultSupportedProps": {
    "extraPlugins": "copilotrefinement,accessibilityhelp,autogrow,autolink,basicstyles,bidi,blockquote,button,collapser,colorbutton,colordialog,confighelper,contextmenu,copyformatting,dialog,editorplaceholder,filebrowser,filetools,find,floatpanel,font,iframerestrictor,indentblock,justify,notification,panel,panelbutton,pastefromword,quicktable,selectall,stickystyles,superimage,tableresize,tableselection,tabletools,uploadfile,uploadimage,uploadwidget",
    "toolbar": [
      [ "CopilotRefinement" ],
      [ "CopyFormatting" ],
      [ "Font" ],
      [ "FontSize" ],
      [ "Bold" ],
      [ "Italic" ],
      [ "Underline" ],
      [ "BGColor" ],
      [ "TextColor" ],
      [ "BulletedList" ],
      [ "NumberedList" ],
      [ "Outdent" ],
      [ "Indent" ],
      [ "Blockquote" ],
      [ "JustifyLeft" ],
      [ "JustifyCenter" ],
      [ "JustifyRight" ],
      [ "Link" ],
      [ "Unlink" ],
      [ "Subscript" ],
      [ "Superscript" ],
      [ "Strike" ],
      [ "Image" ],
      [ "BidiLtr" ],
      [ "BidiRtl" ],
      [ "Undo" ],
      [ "Redo" ],
      [ "RemoveFormat" ],
      [ "Table" ]
    ]
  }
}

Note down the URL of the Web Resource created.

A screenshot of a computer

Description automatically generated

Next, we opened one of the Contact’s forms for Customization, selected the description field, and added the component – “Rich Text Editor Control” to it.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

In the Static value property, we specified the relative URL of the Web Resource file. We can also specify the full path but then we would need to update it each time we move it to other environments.

A screenshot of a computer

Description automatically generated

Save and publish the changes.

We can see the option Adjust with Copilot added to the toolbar for the control.

On selecting the text, and clicking on “Adjust with Copilot”, we get the option to update the Tone of the content.

A screenshot of a computer

Description automatically generated

On selecting a Professional tone, the text is updated in the control.

A screenshot of a computer

Description automatically generated

In case we want to apply to all the fields that are using Rich Text Editor Control instead of specifying it for individual fields, we need to update and add the same JSON to the existing RTEGlobalConfiguration.json file.

A screenshot of a computer

Description automatically generated

The file is blank by default, and we can specify properties to it that we want to override.

A green screen with black text

Description automatically generated

We updated the RTEGlobalConfiguration.json file, to use the same definition we used earlier for our custom web resource.

A screen shot of a computer

Description automatically generated

We can see the “Adjust with Copilot” added to the form even without specifying the URL in the static value while customizing the form.

On saving and publishing the changes, we can then see it rendered for all the Rich Text Editor fields.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Also, check – Copilot Control

Hope it helps..

Advertisements

Few points on UTCNow and FormatDateTime – Power Automate / Dataverse


Recently we wrote a flow that will run daily once and will pick all the tasks due in the last 24 hours i.e. schedule end date less than equal to utcNow() and greater than equal to addDays(UTCNow(),-1)

Interestingly we observed one of the task records not picked.

The scheduled end date on the task record was – 2024-07-22T20:00:00Z

And for the flow the filter condition was –

scheduledend le 2024-07-23T20:00:35.5173871Z and scheduledend ge 2024-07-22T20:00:35.5173943Z

If we look at the date for the greater than equal condition, we can see that the seconds part is 35, the exact time when the List rows step would have run, and in case of that particular task record is 00, so it was not picked.

Then we applied the below formatDateTime function, excluding the time part.

(scheduledend le ‘@{formatDateTime(utcNow(),’yyyy-MM-dd’)}’ and scheduledend ge ‘@{formatDateTime(addDays(utcNow(),-1),’yyyy-MM-dd’)}’ and _regardingobjectid_value ne null and statecode eq 0)

Again we saw few tasks not picked,

The records that were not picked had scheduledenddate as

  • 2024-07-25 18:00:00.000
  • 2024-07-25 19:00:00.000

And as per new condition

scheduledend = ‘2024-07-24’ which essentially was

scheduledend = ‘2024-07-24 00:00:00.0000’

Eventually we updated the flow’s Filter Rows condition to include only the hour and minutes, ignoring the seconds/milliseconds because of which we got the issue in the first place.

(scheduledend le ‘@{formatDateTime(utcNow(),’yyyy-MM-dd HH:mm’)}’ and scheduledend ge ‘@{formatDateTime(addDays(utcNow(),-1),’yyyy-MM-dd HH:mm’)}’ and _regardingobjectid_value ne null and statecode eq 0)

One more example for more clarity –

Below we are creating a contact record and setting values for 3 date time fields, UTC1, UTC2, UTC3.

  • UTC1 = utcNow()
  • UTC2 = formatDateTime(utcNow(),’yyyy-MM-dd’)
  • UTC3 = formatDateTime(utcNow(),’yyyy-MM-dd HH:mm’)

The values for those fields inside CRM’s form –

A screenshot of a computer

Description automatically generated

The corresponding values within the Dataverse/ CRM’s database (UTC) –

A screenshot of a computer

Description automatically generated

Hope it helps..

Author a note before saving the form – Timeline (Dynamics 365 / Dataverse)


This feature added to Timeline control allows us to take notes even before creating/saving the record/form.

Select the Timeline control, then Notes properties, and check the “Enable to author a note before saving the form” option.

Save and publish the change.

A screenshot of a computer

Description automatically generated

Before –

Now after enabling the author note before saving option, we can see the option to create a note enabled on the create form.

A screenshot of a computer

Description automatically generated

We can enter the details and also upload an attachment.

A screenshot of a computer

Description automatically generated

On Saving the record, we can see the notes added to the record.

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

Also, check

Hope it helps..

Advertisements

Mobile Offline Profile – Select columns to be downloaded (Dynamics 365 / Model-driven apps)


With this new feature (preview) now we can specify the columns to be downloaded on mobile devices for offline use.

Select edit for the Model-driven app.

A screenshot of a computer

Description automatically generated

Select Settings and select an existing offline profile or create a new profile.

A screenshot of a computer

Description automatically generated

Select a new table or an existing table for the profile, we can see the Manage Columns option for it.

A screenshot of a computer

Description automatically generated

We can see key columns already selected as part of Required Columns.

We can select columns from the other columns section for our offline profile. The fewer the columns the faster the app will download the data for offline usage.

One point to note is that we get this option only from the Maker Portal not from the Power Platform Admin Center.

Hope it helps..