Perform Age calculation using Formula Columns in Dataverse / Dynamics 365


Below we have created a new field of Data Type Formula and Formula Data Type as Whole Number

A screenshot of a computer

Description automatically generated

Specify the following formula.

RoundDown(DateDiff(birthdate, UTCNow(), TimeUnit.Days) / 365.25, 0)

  • DateDiff calculates the difference in days between birthdate and current UTC Date.
  • Dividing by 365.25 takes care of converting the days to years, considering the leap year into account.
  • Roundown takes care of rounding the result to a nearest integer.

Below we see the field in action.

UTC current date is 10th Wednesday July 2024 for the below example.

A screenshot of a computer

Description automatically generated

Also checkout the helpful video –

and the forum – https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Calculating-age-in-CDS-entity/td-p/495528

Hope it helps..

Advertisements

How to – enable/disable the timeline highlights generated by generative AI – Dataverse / Model-drive Apps


With the Timeline highlights (Generative AI) feature, agents can quickly view the critical information (summary) about the different activities in the timelines, without the need for clicking/reading through each of the activities.

We can enable and disable it at both the form level, app level and environment level.

At the form level, we can check/uncheck the Enable Timeline Highlights checkbox for the timeline component.

A screenshot of a computer

Description automatically generated
A screenshot of a computer screen

Description automatically generated

At the App level, open the Settings >> Features for the corresponding App.

A screenshot of a computer

Description automatically generated

Here if we disable it at the App-level it won’t show up even if it is enabled for that particular form for that particular app.

For e.g. we see timeline highlights in the Sales Hub App but not in the Field Service app in which we had it disabled for the account form.

We can also specify it using the Setting Definitions and Environment values as shown below.

A screenshot of a computer

Description automatically generated

More details –

Use timeline highlights powered by generative AI

Timeline highlights help users quickly access actionable record updates

Hope it helps..

Flow Error – It hasn’t been triggered successfully in the last 28 days (Power Automate / Dataverse)


For one of our flows while testing we realized it was not getting triggered.

We could see it giving below error –

There’s a problem that needs to be fixed to trigger this flow – It hasn’t been triggered successfully in the last 28 days.

We tried a couple of things and I think either switching it on and off and/or updating the trigger condition and saving it temporarily seems to have fixed the issue. Either of these would have created the correct corresponding Callback registration records.

Also check – https://nishantrana.me/2023/08/08/fixed-power-automate-flow-not-getting-triggered/

https://powerusers.microsoft.com/t5/General-Power-Automate/There-s-a-problem-that-needs-to-be-fixed-to-trigger-this-flow-It/td-p/1128820

Hope it helps..

Advertisements

Portal does not load and displays “Server Error” or shows “Getting set up.. This might take a while” message -Portal Startup Issue (PowerApps Portal)


While trying to create a Website with Template – Partner Portal,

A screenshot of a computer

Description automatically generated
A screenshot of a computer

Description automatically generated

we observed the provisioning stuck at – Getting set up…

A white background with black text

Description automatically generated

Also, it was showing the below error on checking the Site Health.

“URL of the Dynamics 365 organization connected to this portal has been changed.” Which wasn’t the case as the URL of the organization was correct.

Usually, the 1st Web Site takes time around an hour and then any new website is provisioned within 15-20 minutes (as the common / base solutions are already installed). This was the first website for that environment, however, when it was more than 24 hours, we then raised a Microsoft Support Ticket for it.

Microsoft acknowledged this as a bug and also got the fix ready, but there was a delay in deploying it because of dependencies internally.

In parallel, they also provided us with a workaround, which fixed the issue for us.

The steps are as follows –

  • Create Web Site with the Customer Self-Service Portal template.
  • Create Web Site with the Partner Portal template.

If Customer Self-Service Portal is not needed, the website can be deleted then, followed by deleting the below Managed solutions specific to Customer Self-Service.

  • CustomerPortal    (Dynamics 365 Portals – Customer Self-Service Portal)
  • MicrosoftPortalAutomate (Dynamics 365 Portals – Automate)
  • MicrosoftPortalEnhancedDMMigration  (Dynamics 365 Portals – Enhanced DM Migration)
  • PortalSitewide_RPServiceApp   (PortalSitewideRPServiceApp)

Also delete the website records created specific for Customer Self – Service Portal – https://www.youtube.com/watch?v=i9jeWaO93IM&ab_channel=EngineeredCode

We followed the above steps and got the Website with the Partner Portal template created successfully.

A screenshot of a computer

Description automatically generated

Hope it helps..

Advertisements

Versioning and Drafts for Solution-based Cloud Flows – Power Automate


We now have the version support for Cloud Flows in Power Automate.

This feature is only available in the new editor.

Let us start by creating a simple flow, the creation part will happen in the existing editor.

A screenshot of a computer

Description automatically generated

Let us save the flow, and select Edit >> Details in a new tab to open it in the new designer inside Power Automate Maker Portal

A screenshot of a computer
Description automatically generated
We can see the below different commands in the new designer

  • Version History
  • Save Draft
  • Publish

Below we have made changes to the flow and clicked on Save Draft.

Clicking on Save Draft changes the flow to Draft and shows the message “We saved your draft flow. You can test and run it after you publish

From the Version History, we can see the Latest Version, Published Version, and the Past Published version, with the option to Restore it.

A screenshot of a computer

Description automatically generated

We can save a draft of a flow even with errors now.

A screenshot of a computer

Description automatically generated

Check for more details – Draft and Versioning for Cloud Flows

Hope it helps..

Advertisements

Fixed – The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters exception in Plugin (Dataverse / Dynamics 365)


Recently for one of our plugins, that moves attachments to the Azure Blob Storage, we got the below exception.

BlobFileName: WFU000069107_Inside Install – CFC__2024_03_03_12_24_05_179_temp.jpg
Caught Exception: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)


We were getting errors while trying to use the FromBase64ToString method to decode the Base64 encoded string into its original byte array.

Seemed there were some issues with the image uploaded, even from the browser when trying to download we were getting the below exception.

The solution was to check if it is a valid Base64 encoded string before converting it to a byte array and if not skip it and process other attachments in the plugin.

const string base64Pattern = @"^[A-Za-z0-9+/=]*$";

Hope it helps..

Advertisements