How to – Upload a file by URL to SharePoint (Power Automate / Dataverse)


Recently we had a requirement to upload a document (pdf) to a SharePoint folder.

We had the URL of the field saved in one of the fields of the Contact table in Dynamics 365 / Dataverse.

Below is our field and the URL in it. (the URL points to the Manual of Fulla 2, one among many awesome products by Schiit)

Below is how our flow looks like

Here we already have Server-Based SharePoint integration enabled. https://nishantrana.me/2023/07/28/based-on-entity-behavior-for-sharepoint-folder-dynamics-365-dataverse/

The flow triggers when there is an update in the File URL field of the contact record.

Next, we are using HTTP action to use the GET method to get the content of the file. As it is a public URL we haven’t specified any Authentication.

Next, we are using Create File action of SharePoint, we have specified the Site Address, Folder Path, File Name, and most importantly the Body of the HTTP action to the File Content property.

On the successful run of the flow,

we can see the document (pdf) uploaded in the SharePoint folder.

Hope it helps..

Advertisements

Trying out – CreateMultiple bulk operation message (Preview) in Dataverse (Dynamics 365)


As we know now we have the bulk operation messages – CreateMultiple, UpdateMutiple, and DeleteMultiple (only for elastic tables) released with UpsertMutilple coming soon.

The messages allow us to work with records in bulk. Get more details here

And in fact, now we can also write plugins against the CreateMultiple and UpdateMultiple messages. Get more details here

These messages are available for all the custom tables, but not all the standard tables.

To check availability with standard tables

<fetch>
  <entity name="sdkmessagefilter">
    <attribute name="primaryobjecttypecode" />
    <link-entity name="sdkmessage" from="sdkmessageid" to="sdkmessageid" link-type="inner">
      <filter>
        <condition attribute="name" operator="eq" value="CreateMultiple" />
      </filter>
    </link-entity>
  </entity>
</fetch>

Just to quickly try it out, we created 1000 contact records one by one and then used the CreateMultipleRequest in bulk.

We got the time-out error.

Same error message while working with 500 and then 200 records.

Finally, we got success with 100 records.

We should use the bulk message in multiple parallel threads under different application users to improve the performance – https://nishantrana.me/2021/06/08/data-migration-optimum-batch-size-and-threads-for-maximum-throughput-microsoft-dataverse-dynamics-365/

Hope it helps..

Advertisements

Date Time Fields (Date Only and User Local – Behaviour) in Power Automate (Dataverse)


Recently we faced an issue in our flow that was showing a different date that the date entered by the user for a date time field.

Let us look at the below scenario to understand it.

Say we have the below field Date and Time with Time Zone Adjustment as User Local created in CRM / Dataverse.

Now user enters the below value in in the field and saves the record which triggers the flow.

The user’s time zone is set as below

Now in our Power Automate flow, we can see the UTC date for it.

2023-08-27T20:00:00Z

Now to convert to the user’s New Zealand Time Zone we can make use convertTimeZone function here

convertTimeZone(triggerOutputs()?[‘body/cr0e8_mydatetimefield’],’UTC’, ‘New Zealand Standard Time’, ‘MM/dd/yyyy’)

We get the date as expected i.e. 28th

Now let us change the Format of the field to Date Only, and we keep the Time zone adjustment as User Local only.

Let us trigger the flow again. (now we don’t have the time part)

We get the date without time part as expected.

But this time the convertTimeZone
function doesn’t work, as we only have the Date part and it is not in the UTC format.

convertTimeZone(triggerOutputs()?[‘body/cr0e8_mydatetimefield’],’UTC’, ‘New Zealand Standard Time’, ‘MM/dd/yyyy’)


Check this thread that talks about it –

https://powerusers.microsoft.com/t5/Building-Flows/Dataverse-Date-only-field-is-set-1-day-off-from-original-value/td-p/805859

Here one quick fix could be to change the Time zone adjustment to Date Only or Time zone independent for that field(i.e. no time zone conversion).

https://learn.microsoft.com/en-us/power-apps/maker/data-platform/behavior-format-date-time-field#date-and-time-column-behavior-and-format

Now triggering the flow again, we get the below values –

as now there is no time zone conversion for that field.

Hope it helps..

Advertisements

Fixed – The ‘CreateMultiple’ method does not support entities of type ‘none’. MessageProcessorCache returned MessageProcessor.Empty in Dataverse / Dynamics 365


Recently while trying to use the new CreateMutipleRequest message we got the below error –

“The ‘CreateMultiple’ method does not support entities of type ‘none’. MessageProcessorCache returned MessageProcessor.Empty”

It was because we were not populating the EntityName property of EntityCollection class. Specifying it fixed the issue.

Hope it helps..

Advertisements

Blog Posts on Voice Channel – Dynamics 365 Omnichannel for Customer Service


Listing down the blog posts on Voice Channel setup and configuration for quick reference

Advertisements

Customize label – Search customer, Search Issue in Conversation form – Omnichannel for Customer Service


To rename the Search Customer and Search Issue labels in the conversation form,

search and open the corresponding RESX Web Resource for customization.

The search term used – “CustomerSummaryLabels.1033”

Open and copy the content

Update the value property accordingly

Before –

To –

Upload and publish the changes.

We can see the labels updated.

Hope it helps..

Advertisements

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓