Perform a changeset request in Dataverse connector in Power Automate

You must’ve noticed Perform a changeset request in the Dataverse connector in Power Automate.

Purpose of this Action is to perform batch of available Dataverse connector actions successfully or rollback the batch performed inside this changeset request.

Here’s what it does.

Perform a changeset request

Here’s how to use the connector action

  1. Select Perform a changeset request in the Dataverse connector Actions list.

  2. Now, since this works like a batch of operations to perform all actions successfully or “rollback” operations, you’ll see this working like a Scope but only for Dataverse actions.

  3. You have the below Actions available to perform.

  4. Now, let’s design an example changeset batch here.
    First, I’ll create an Account and then a Contact.

  5. When this Flow runs, for example, if the Contact creation fails, the Account creation too will be rollbacked unlike having these steps outside of the “Perform a changeset request” action.



  6. Please note that the Outputs of the Changeset request itself or even within the steps within a changeset request cannot be captured or referred to in Dynamic Content.

Hope this helps!

Advertisement

Adding Editable Grid using the New Power Apps Grid Control in Model-Driven Apps | [Preview]

If you are designing your forms in the Model-Driven Apps designer from the Power Apps Maker i.e. https://make.powerapps.com/, here’s how you can add the New Power Apps Grid (which is in Preview at the time of writing this post)

Scenario

For example, you are in Model Driven Apps designer and you are see the existing Grids, they have only 2 areas in Properties –

  1. Select the Grid and you’ll only see 2 areas –


  2. And if you expand them, you won’t find a way to change the control to, for example, Editable Grid.

  3. That’s where the new Power Apps Grid Control comes hand. This is currently in Preview at the time of writing this post.

New Power Apps Grid Control [Preview]

Now, click on the Components section to reveal all the Components that you could add to the Model-Driven Apps form –

  1. You’ll see the More Components section under which you’ll find the new Power Apps Grid Control.

  2. Now, once you drag is on the form where you want it to be, you’ll be asked to select the records it should hold. It’ll ask you to select the Table which you want to display in the sub-grid.

  3. Once you click on Done, make sure the Show Related Records is selected as well and ensure the Table and View selected is correct.

  4. Now, look for Components section and expand the same. Expanding the Components, you’ll be able to select the Editable Grid.
    Expand the Components section and you’ll find another button to add more components that are made available.

  5. Now, you’ll be able to select the Editable Grid here.

  6. Now that you have added Editable Grid, click Done.

  7. And once you add, you’ll notice that the Mobile, Web etc will be shown under the new grid. Means this is now set as default and not the other 2 views.

  8. Finally, you can save your changes and publish.
    And that’s how you are able to add Editable Grid on the modern Power Apps Model Apps designer using the new Power Apps Grid Component.

  9. And here’s how you’ll be able to add an Editable Grid on the Form using new Power Apps maker.

Here’s the Microsoft Learn link for the same – https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/the-power-apps-grid-control?WT.mc_id=DX-MVP-5003911

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Setting up Billing Policy for Dataverse Environments in Power Platform for Azure Pay-As-You-Go plan | Microsoft Azure

Pay-as-you-go has been recently announced with Azure and I too wanted to explore this topic myself on my trials Dataverse/D365 Sales environment as well as my Microsoft Azure trial subscription which I started.

Disclaimer: Please note that I’m exploring this topic and sharing as I go on. Hence, I’ll continue to write further topics as I proceed. Please try on your Dataverse trial & Microsoft Azure trial subscription to identify / estimate the costs your actual implementation will incur.

I also recommend going through the below Microsoft Learn Pages for detailed information on pricing and meters of the Pay-as-you-go model –

Detailed Microsoft Docs for Pay-as-you-go: https://learn.microsoft.com/en-us/power-platform/admin/pay-as-you-go-overview?WT.mc_id=DX-MVP-5003911

Power Apps Pricing: https://powerapps.microsoft.com/en-us/pricing/

Pay-as-you-go Meters: https://learn.microsoft.com/en-us/power-platform/admin/pay-as-you-go-meters?tabs=image?WT.mc_id=DX-MVP-5003911

Let’s see how we can get started!

Setting up Billing Policy

Here’s how you create Billing Policy in Power Platform –

  1. In Power Platform Admin Center (https://admin.powerplatform.microsoft.com/), you can see Policies section. If you expand the same, you can see Billing Policies.

  2. Here, you can start by creating a new Billing Policy

  3. You can give it an appropriate name. And it doesn’t allow you to have spaces.

  4. Next, you’ll be asked to select the Subscription you wan to assign the Billing Policy under.
    Notice the error below. My Free Trial Azure Subscription doesn’t have a Resource Group created yet. Hence, this need to be present.


  5. Since at this point, I don’t have a Resource Group under the Azure Subscription I selected, I need to go to Azure Portal (https://portal.azure.com/), search for Resource Groups

  6. Since you might not have any Resource Group right away, you can create one.


  7. I’ll just give it a name which I can identify with.


  8. I’ll validate and Create the same in Azure.


  9. Resource Group will be created here.


  10. Now, when I come back to Power Platform, if I reselect the Azure Subscription, I’ll now see that the Resource Group I created is showing up.

  11. I’ll select the same and select United States as the Region.
    And click on Next.


  12. In the next steps, I can select which all Environments should be included in the Policy. Then, I can click on + Add to policy.

  13. You can see the Added to policy tab now showing your environment. Once you are satisfied with the selection, you can click on Next.

  14. Final step is to now Review and confirm the policy you are creating.

  15. It’ll take a moment to start provisioning. Then, you’ll see the status as Provisioning.

  16. Once completed, the status will show as Enabled.


  17. Now, when you go back to Azure Portal and open the Resource Group, you’ll find a Deployment show up



  18. Open it up and you’ll see a Deployment created.

  19. And if you open the Deployment, you can see the DataverseBilling which we had set up in Power Platform.


  20. And this point, you are now setup with using Pay-As-you-go plan for your Dataverse environment(s).

    Note: Further, I’ll write follow up posts as I explore Pay-as-you-go scenarios and experience myself.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Create Custom APIs in Dynamics 365 CRM | Power Platform

Custom APIs in Dataverse is a great way to build your own API messages to encompass complex business operations into a single API. And Power Platform Admin Center provides a great way to keep things simple and yet build your custom APIs just like writing Plugins in Dynamics 365 CRM itself.

Pre Requisites

In order to build your own APIs, you must know the following –

  1. Writing Plugins in Dynamics 365 CRM – In case you are new to plugin development itself, you can follow this blog series wherein I’ve demonstrated how you can start writing your own C# Plugins for Dynamics 365 CRM.
    Link: Plugins Development in Dynamics 365 CRM for Beginners | [Blog Series]
  2. You’ll also need to know how to connect Postman to your Dynamics 365 CRM environment in order to test your APIs before you can use it in your custom application. I have a blog for the same as well.
    Link: Setup Postman to connect to Dynamics 365 CRM using OAuth 2.0 | Azure App Registration

Scenario

Here’s a scenario where I’ll demonstrate how you can use Custom API to do an operation in Dynamics 365 CRM and send back result to the calling application.

  1. Custom API is exposed to the calling application. Postman in this case.
  2. Once API is called and parameters is passed, a simple update of a field to an Account will take place.
  3. Result will be returned to the calling application. Again, Postman in this case.

Create your Custom API & Parameters in Power Platform Admin Center

Let’s create a Custom API that’ll pass on parameters to a plugin and plugin in-turn will send back the result itself –

  1. Assuming you have created a Solution in the correct Dynamics 365 / Dataverse environment. Click on New, and look for Custom API.

  2. Give it a suitable Name and fill in the Attributes which are required. Here, the unique name of the API is cf_processaccountapi.
    I will cover the other properties in a different blog post.

  3. Now, I’ll create 2 attributes which I need to pass as parameters to the API call itself.
    Hence, I’ll now create 2 new API Request Parameters in the solution by following the below menu.

  4. First will be the Account Code. I’ll select the Process Account API from the Custom API lookup on the form and then give unique name.
    Here, my parameter is of type String.

  5. And once I save this, this is how my parameter 1 i.e. Account Code is supposed to look.

  6. Similarly, my second parameter is as follows which accepts a String value. This parameter is called Grade Code. Again, this is just an example. Your scenario could be anything.

  7. Finally, I’ll also create a Response Property for the Custom API in order to send back the response to the caller.

  8. And just like how I defined the Request Parameters, I’ll also create the Response property as below.
    The form is quite self-explanatory by now.


  9. Once all of this is done, here’s how my API structure looks like in the solution.

Sample Plugin for Custom API & Registering it using Plugin Registration Tool

Given that you know how to work with Plugins in Dynamics 365 CRM, here’s how you can register the plugin as usual –

  1. In my plugin, I’m capturing the values from the attributes just like I would identify the context of a Plugin which runs on Update of an Account.

  2. Then, I’m finding the Account using the Account Code that was passed and updating that Account with the Option Set value which will be the Grade Code.

  3. Then, once all the processes are done, I’m setting the Output Parameter accountProcessResult with the success message.


  4. Open the Plugin Registration Tool and log into your environment. Then, Register the Assembly itself.

  5. Once your plugin has been registered, you’ll need to open the Custom API record again and associate this registered plugin on the Custom API record.
    Open the Custom API record which we created above –

  6. When you associate the Plugin Type, make sure you Save and Publish the customization.
  7. Now, we will test using Postman. Before we test, notice the Account Grade column which is of type OptionSet – we will update this using the Custom API we built.


    The OptionSet fields looks like below –

Testing Using Postman

Now that the code for the Custom API is ready as well as the Plugin too has been registered, let’s test the same using Postman –

  1. Again, in case you haven’t set the Postman to authenticate and connect to your D365 CRM environment, you can follow this post and set up your Postman to be able to call Dynamics 365 CRM.
    Link: Setup Postman to connect to Dynamics 365 CRM using OAuth 2.0 | Azure App Registration
  2. Now, given that you were able to successfully connect Postman to Dynamics 365, you can do a simple metadata call and check if you connection was successful.

  3. Now, look at the unique name of the Custom API we created.
    Now, switch the method to Post, and append the name of the Custom API itself.
    Then, in raw – select JSON type data and construct the JSON to be sent.

  4. And the result will be returned based on what Output Parameters was set.

  5. And you’ll see the data on the OptionSet being updated through this example.

Hope this was useful and this helped in clarifying the concept!

Here are some Power Automate posts you want to check out –

  1. See Trigger Outputs using Edit Columns in Flow Runs | Power Automate [Quick Tip]
  2. Adding Image field on the form in Dynamics 365 CRM | Power Platform Modern Form Designer [Quick Tip]
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Authenticate Dataverse connector using Service Principal in a Power Automate Flow

Many times, users/admins are not comfortable using their credentials being used as Connections. Some connectors do provide the ability to authenticate using Service Principal.

Let’s jump into this! 😊

Setting Up App Registration for Dynamics 365 CRM

Here’s how you setup an App Service to be used as a Service Principal for Dataverse connector in Power Automate –

  1. Go to the Azure Portal (https://portal.azure.com/) and the look for Azure Active Directory.

  2. In Azure Active Directory, look for App Registrations in the menu.

  3. Now, create a + New registration record.

  4. Now, give this App Registration a suitable name. And you can select your preferences on how the tenant type should be. I’ve left it to Single tenant or simplicity of the example.

  5. Now, once this is created, go to the API Permissions section.

  6. Now, look for a button to Add a permission.

  7. Then, select Dynamics CRM and select it.

  8. Once this is selected, you’ll get to select user_impersonation. Then, clicked Add permissions.
  9. Once added, you’ll see that the Status column is blank. Then, click on Grant admin consent for <TenantName>.

  10. Once you click on Grant admin consent button, you’ll be asked for confirmation. Confirm the same.

  11. Once you confirm, you’ll see the status as Granted as shown below.

  12. Then, go to Certificates and secrets. Once in that, click on + New client secret.

  13. You’ll be asked the the Description, do so and Save it.

  14. Now, you need to copy the value onto Notepad.

  15. Now, let’s move to adding this App Registration to the Power Platform Admin Center so that you can then give appropriate permissions so that it can be used for Authentication into Dataverse.

Add Application User in Power Platform Admin Center

Go to the Power Platform Admin Center (https://admin.powerplatform.microsoft.com/) and the to the Environments section and select the correct Dataverse environment –

  1. Select the environment which will have your Flow that will use the Dataverse connection in question.
    And click Settings.

  2. Now, expand Users + permissions section and look for Application Users.

  3. Now, in Application Users, you’ll need to add the App Registration as a User and give Roles. Now, click on + New app user.

  4. Now, click on + Add an app.

  5. Now, any App Registration that has not yet been created in the current environment as user will automatically appear. Select the one you created – “Dataverse Service Principal” in this case and click on Add.

  6. Now, select the BU.

  7. Next, click on Security Roles’ pencil to give roles.

  8. I’m just giving System Administrator for simplicity of example.

  9. Now, you should be good to create this user. Click on Create.

  10. Finally, your Application Record will look like this –

  11. Now that your Application User is set in Dynamics / Power Platform Admin Center, you are all set to add this to authenticate the Dataverse Connector in Power Automate. Let’s do that!

Authenticating using Service Principle in Dataverse action

Now, let’s say you are starting a Flow with the Dataverse connector –

  1. Select the Dataverse trigger you want to use. I’ll pick a common one.

  2. Now, click on the three dots and look to add a new Connection if it already authenticated using the logged in user which is the default behavior.

  3. Now, you’ll see the option to select –

  4. Now, you’ll see these fields to fill in.

  5. Now, first give the connection itself a suitable name.

  6. Now, for Client ID – Go to the App Registration in Azure and look for the Client ID in the information section. It’ll look like this –


    Paste it in the Client ID field and it’ll look like this –

  7. Now, look for Client Secret – open the Notepad where you saved the Secret we copied while creating the Client Secret record in Azure.

  8. Now, finally – Go to the App Registration record and you’ll find the Tenant ID here –


    And paste is where it says Tenant. Now, Create this connection!
  9. Ensure that the Connection is selected.

  10. I’ll just add an extra variable in order to save this simple Flow and then we’ll create an Account (simple example if you see the screenshot below) in order to Run this Flow.
    My Flow looks ready to be tested.

  11. Now, I’ll create an Account in my Dynamics 365 CRM.

  12. And the Flow would have Run already.

Validate

In order to ensure the connection is run by the Service Principal itself, you can do this –

  1. In advanced options, you can choose to “Run as” as “Flow owner


  2. And when you check the details in the Flow Run, you can check the attribute in the trigger “RunAsSystemUserId

  3. And if you check this GUID, it belongs to the Dataverse Service Principal user we set up.


    And that’s how you can setup to run the Dataverse action to use Service Principal instead of user credentials!

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Dynamic content behavior for Get a row by ID and List Rows action in Dataverse connector | Power Automate Flow

Here’s an observation in one of the actions in the Dataverse connectors in Power Automate, which is “Get a row by ID”.

Select Columns

If you have selected specific columns in the Select Columns parameter of the connector, only those will be shown in the Dynamic content in next steps of the Flow.

All Columns

When you have not mentioned/selected specific columns and kept it blank, you’ll see the complete list of fields in the next steps of the Flow.

List Rows action

The same is also true for other action like “List Records” which shows all the attributes when selected columns are not mentioned, but shows only the ones mentioned with other required attributes if you have specific column names entered as shown below.

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Identify entities with same names in Dataverse Power Automate connector | [Quick Tip]

Often times, while using Power Automate with Dataverse, you may have come across scenarios where it was difficult to identify the entities with same names.

Scenario

When trying to pick entities with same names, like Attachments, so we don’t need to guess when you can confirm.

Peek Code

So, you can use Peek Code to take a look at the entity name i.e. the backend name of the entity which you have picked –

  1. Click on the 3 dots on the action, and select Peek Code.

  2. And as you can see, you can identify which entity is selected with the same name. You’ll need to know the correct backend name which you intend to select.
    activitymimeattachments

    attachments

I also suggest this is useful when picking other options elsewhere. Do let me know in the comments below as to where all you applied this. 😊

Hope this was useful!

Here are some Power Automate posts you want to check out –

  1. Blocking Attachment Extensions in Dynamics 365 CRM
  2. Upgrade Dataverse for Teams Environment to Dataverse Environment
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Upgrade Dataverse for Teams Environment to Dataverse Environment

Given that you have licenses already in place along with the required Capacity in order to Upgrade from Dataverse for Teams to Dataverse, upgrading the same is an extremely easy process –

Upgrade to Dataverse

In case you have Dataverse for Teams environment and you want to upgrade to Dataverse, here’s what you do in the Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)

  1. Go in the Dataverse for Teams (Microsoft Teams) type of Environment and look for the Upgrade button on the top right corner.

  2. Here’s what the Welcome Page looks like, make sure you understand the operation you are doing as this is permanent and cannot be undone!
    Here’s the detailed Microsoft Documentation on the difference between Dataverse for Teams and Dataverse itself – https://docs.microsoft.com/en-us/power-platform/admin/about-teams-environment?WT.mc_id=ppac_inproduct_env#promotion-process?WT.mc_id=DX-MVP-5003911

  3. Once you clicked on Next, you’ll need to agree to Terms and then confirm the same. Again, this operations is a permanent and can’t be reversed.

  4. It’ll start the process just like any other standard environment change process in Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)

  5. This is how it will look while it is being Upgraded.

  6. This took over 1-2 hours. And once done, your environment will be upgraded.

Hope this was helpful!

Here are some Power Automate posts you want to check out –

  1. Create a Dataverse for Teams environment and add a Canvas App in a Channel
  2. Showing Sandbox or Non Production Apps in Power App mobile app
  3. Create a Power Apps Per User Plan Trial | Dataverse environment
  4. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  5. Co-presence in Power Automate | Multiple users working on a Flow
  6. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  7. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  8. Call a Flow from Canvas Power App and get back response | Power Platform\
  9. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  10. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  11. Asynchronous HTTP Response from a Flow | Power Automate
  12. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  13. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Flows with Dataverse triggers not working after Minimal Copy in Sandbox instance | Power Automate

There are 2 possible ways the Flows are not triggering on the Sandbox instance after a Minimal Copy.

Let’s look at both the scenarios!

Administration Mode

Let’s get the more obvious options out of the way first. So let’s look at the Administration Mode scenarios where the Background Processes are turned off right after the Minimal Copy is completed –

  1. In Power Platform Admin Center (https://admin.powerplatform.microsoft.com/), you can navigate to the environment and look if the Administration Mode is enabled or not.

    And if it is, the Background Processes are still turned ON or not.

  2. Now, the Administration Mode can stay ON, the Background Operations however should be Enabled.

    If not, then the Administration Mode itself can be disabled entirely which will keep the background operations enabled.


    But even if this doesn’t help and your Flows are not triggering, below is another possibility.

Callback Registrations in Dataverse

Callback Registration records are created when you create and Save Flows –
Microsoft Docs on Callback Registrations here – https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/callbackregistration?view=op-9-1?WT.mc_id=DX-MVP-5003911

  1. Now, the reason the Flows are not triggered are because of the Minimal Copy, the Callback Registration records on the Environment also got deleted.
    So, you can now create a new Flow to query all the Callback Registration records on the environment.
    Add Row Count as 100 or something so that you don’t get a Flow Checker warning. 😊

  2. Now, when you read what Callback Registration records are retrieved, you’ll only find 0 records because all the Dataverse trigger Flows are deleted

  3. And all the other Callback Registration records which should belong to the other Flows (which has Dataverse as the trigger and not other Flows) in my environment are not listed!

  4. And that’s why, the Flows are not triggered which are supposed to be triggered from Dataverse/CRM.

Solution

There are 2 solutions to this –

  1. First is to Delete the Trigger itself


  2. And then re-add the same trigger

  3. And make sure it has all the right steps which it was supposed to have and then Save.

  4. Now, if you Run the on-demand Flow to check the Callback Registrations, 1 record must now have been created.
    And it belongs to the entity which you created the Trigger for. Annotations (Notes), in this case.

  5. And now, if you perform the operation in Dynamics – the Flow will be triggered.

  6. Second solution is to Re-import the Flow or the Solution in which you Flow belongs.

Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Create file correctly in SharePoint from Dataverse connector using Power Automate | Using base64ToBinary expression

If you are creating a file from Attachment from a Dynamics 365 CRM record and trying to load it in SharePoint and it doesn’t get created/read correctly?

Although, it might appear it was correctly uploaded, it might not open correctly and could look like this.

Scenario

Consider this scenario – You want to store the Documents that you attach in Notes to SharePoint.

  1. Let’s assume you are uploading this PDF document on the Note and now you want to upload this to SharePoint.

  2. And you have a Flow to send this document to SharePoint which runs when you create a Note in Dataverse (Dynamics 365 CRM)
    Now, the Create file action in SharePoint will look something like this –

    If you use the new Dataverse [green] connector to pick up the attachment from the Note created in Dynamics CRM –


    It’ll let you add the Document to the File context in SharePoint’s Create file action.
    This is triggerOutputs()?[‘body/documentbody’] if you hover over it.

  3. And upon running this Flow, the document will be created in SharePoint.

  4. But when, you open the file, you’ll find this error that you can’t read the file although it appears that is was uploaded correctly.

  5. And also, the browser can’t open it either even if you download it.

Use base64ToBinary conversion

Here’s a step to create a File in SharePoint in your mentioned SharePoint library –

  1. In order to correctly pass this through, use the base64ToBinary expression in the Create file’s File Content field.

  2. And in base64ToBinary, put the Document so that it looks like this – “base64ToBinary(triggerOutputs()?[‘body/documentbody’])

  3. And when you re-run the test, the document will be created in the same way.


    And now when you open it, it’ll open properly.


    Hope this solves the issue!

Dataverse (Legacy) connector

Here’s a difference you’ll notice in when you are using the Dataverse (Legacy) [gray colored] connector –

  1. If you are using the older Dataverse Legacy connector to pick your file from Dynamics 365.

  2. And try to add it to the Create file in SharePoint’s connector –

  3. It’ll let you add it but not let you save it.


    You’ll face a validation error – “Flow save failed with code ‘OpenApiOperationParameterValidationFailed’ and message ‘Input parameter ‘body’ validation failed in workflow operation ‘Create_file’: The parameter with value ‘”@triggerOutputs()? [‘body/documentbody’]”‘ in path ‘body’ with type/format ‘String/bytes’ is not convertible to type/format ‘String/binary’.’.

    Here’s a detailed post of a scenario posted by my friend Linn: https://linnzawwin.blogspot.com/2021/02/handle-base64-and-binary-file-content.html

Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!