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!

Select the item based on a key value using Filter Array in Power Automate

In case you need to select an item from an array in Power Automate based on the value of a certain attribute, here’s how you can do it.

Scenario

In the below example, we want to select the item / array of objects where we want to select based on a value of an attribute. Here, the attribute is “key” and we want to select the condition to match the value “RelatedEntities

As you see, the array of objects have different structure – All of them have an attribute called “key” and that’s the one you want to select and then process further.

Let’s see how we do it.

Filter Array

Let’s see how you can select the item from the array based on the value of the “key” attribute instead of looping through all the items and matching.

  1. Now, let’s say the data is stored in the variable for demo purposes, that’s what I’m feeding into the Filter Array action in the Flow.
    Remember what goes into the Filter Array action has to be an array data.

  2. In Data Operations connector, you’ll find the Filter Array action which we’ll need to pick the item with “key” = “RelatedEntities”

  3. In Filter Array, you set the Input to the array data which is stored in the variable shown above.

  4. Once you select, you then need to provide the condition to filter the Array.
    In this example, we want to filter based on the “key” = “RelatedEntities” as seen in the Scenario section above.
    So, in the dynamic content section, go to Expression section and then use item() function and just like you access an element in a JS, you can mention what attribute you are trying to access.

  5. And in the value, you can mention what the value has to be.

  6. And in the answer, when you run the Flow with the sample data, you’ll get the below result.

  7. The other elements are filtered out. If you have two items of the same value, both will be returned.

  8. Below is how the actual code looks like when you edit in Advanced Mode –

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!

Select values from an array using Select action in a Power Automate Flow

In case want to pick a value from the attribute from an array or array of objects, here’s how you can do it.

Scenario

Let’s look at the below array of objects –

  1. Here’s sample data in a variable where there are 2 objects in an array.
    And we want to retrieve the value of the attributes called as “LogicalName


Select action in Data Operations

In order to fulfil this, let’s look at the Select action in Power Automate –

  1. In Data Operations, you’ll find Select operator

  2. When you choose Select, it’ll ask for the source of data, in this example – it’ll be the variable where we have Array of Objects.

  3. Now, you can choose what the resultant attribute should be called. You can enter custom name here.
    In this example, I want to call it “Name of Entity

  4. Now, in the Enter Value part, you must select the Logical Name attribute. So, you can use item() function to pick the value. Here’s how you use it –

  5. Once completed, your Select action will look something like this and you are ready to test.

  6. And when you run this test, here’s the result you’ll get –
    You’ll pick all the values in each of the “Name of the Entity” attribute in this array.

Array vs Object

  1. In case you have just a single Object and not an array, you still need to use an Array.
    Let’s say you choose Object type. The Flow will let you save.

  2. But, at runtime, it’ll throw the below error –
    “The ‘from’ property value in the ‘select’ action inputs is of type ‘Object’. The value must be an array.”


    So, the workaround is to store this in an Array itself and keep the type to Array.


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!

Locking fields on the Form by adding dependencies in Dynamics 365 CRM

As a best practice, you must ensure that other Customizers of your system don’t accidently remove the field from the Form which is dependent on your JavaScript code on the form.

Scenario

Let’s consider this scenario and securing this field from removal from form –

  1. You have a Budget Amount field on the Opportunity form which is used in your JavaScript and should not be removed. Or could be some other reason like Business Rule or plugins.

  2. This field can be easily removed by clicking on Remove because if you look at the Field Properties, this has not been locked yet.


    Let’s ensure no one is able to remove this field.

Lock Fields on the Form – Manual

First step is to manually locking this field on the form.

  1. If you open the Field Properties, you’ll see that you can actually select Lock the field on the form.

  2. This will work and ensure that the field is locked on the form. But, it is open for a new person to simply unlocking from Field Properties and removing the field later on.

  3. Hence, let’s look at a recommended way to secure these fields further.

Lock Fields on the Form – Creating Dependency

Here’s a recommended way to lock fields on the form in a better way –

  1. Assuming this field is still unlocked on the Form and you need to secure it.

  2. In Form Properties, go to Non-Event Dependencies tab.

  3. Now, select the field in question. Budget Amount in this case.
    Move it over to Dependent fields list from Available fields and click OK.

  4. Now, you can see that the field is locked on the form again.

  5. And if you try to unlock it from Field Properties, it won’t be unlocked from there since you have created a Dependency for the same.
    You can see that the option to unlock/unselect the Lock the field on this form is disabled.

  6. And to remove this, you actually need to go to Form Properties and remove it from the Non-Event Dependencies list which is a good measure instead of locking it from the Field Properties itself.

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!

Users cannot create Flows in Power Automate | Environment Maker permissions

If you are someone who has been asked to create Flows in Power Automate, and you go to Power Automate portal (https://make.powerautomate.com/) to make your first Flow in your environment, you may come across this if you are not an Administrator yet –

The error message would say -“You are not permitted to make flows in this ‘<EnvironmentName>’. Please switch to the default environment, or to one of your own environment(s), where you have maker permissions.

Now, let’s see what the issue is about.

Environment Maker Permissions

As a Power Platform Administrator yourself, you’ll need to provide Environment Maker privileges (Security Role) to the affected User in your environment –

  1. Navigate to the the Settings for the Environment in PPAC (https://admin.powerplatform.microsoft.com/)
    And look for Security Roles in Access area –

  2. Look for the Environment Maker role.

  3. When in Environment Maker role, look for the Add People button on the top.

  4. Now, search for the user who should have the Environment Maker permissions and click Add (which will be at the bottom of the pane).

  5. Now, you’ll see that this user is added.

  6. Now, when the User will refresh the Flow Editor, they’ll no longer see the error message and will be able to create/save Flows.

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!

Show ribbon button only on selected sub-grid of the same entity | Ribbon Workbench | Dynamics 365 CRM

In some scenarios, you might need to show only specific buttons on a sub-grid of an entity but this sub-grid is being used at multiple places and hence, all the buttons appear in each of them and not filtered based on the purpose of the sub-grid at a specific location.

Let’s look at a scenario to understand this better!

Default Scenario

By default, you’ll see all the buttons added to sub-grid in all instances of the sub-grid for the same entity.

Expected Outcome

Let’s look at this scenario to understand better –

  1. Account has a child entity Subscriptions. Now, under Account, there are 2 sub-grids for the same child entity –
    Active Subscriptions & Past Subscriptions

  2. Now, in order to have different buttons on these like
    Active Subscriptions should show End Subscription.
    Past Subscriptions should show Reactivate.

  3. To achieve this, we’ll be using Custom Rule in Enable Enable Rules in Ribbon Workbench. Let’s review how we can achieve this.

Separate Buttons on different Sub-grid based on View

Here, the approach is to have separate buttons on the sub-grids based on the “Name of the View”. We’ll achieve this using JavaScript, let’s review how –

  1. In your Ribbon Workbench, by default you have both the buttons added.
    So first, we’ll add the condition to show the buttons only on record selection –


    The way this is implemented is that you can attach an Enable Rule to the Command of the ribbon button.


    And the actual Rule is as below

  2. Now, the way the buttons should be separated are based on the name of the view itself.

  3. In order to observe what buttons should be shown on the above view, we will go the Custom Rule approach in Ribbon Workbench for the Enable Rule which is tied to the Command itself (which in turn, is attached to the actual button).
    For Inactive View, the below Enable Rule will be applied.

    And for Active Subscription grid, we’ll use the below Enable Rule which is meant for Active Subscriptions view.

  4. And, in one of the Custom Rules, you’ll see that we are calling a JS function which will check whether to return True or False based on what View the button is being run on.
    In the below Enable Rule, we are adding a Custom Rule which is calling a JS function and we are passing the current SelectedControl parameter (in this case, it’s the view itself!)

  5. And the function looks like below –
    It’ll return if the current View is the one intended.
    In the below example, we are reading what the selectedControl is – And if it matches the one we want to match to i.e. the intended Enable Rule, the True or False value are set based on the same.


    And that’s how you can have each Command in RibbonWorkbench work off of different JS functions which identifies the current View that the Command’s button is present on.

    And once this works, you’ll see the correct buttons show up on either of the views as required.


Code Samples

Here are the code samples which you can copy and modify for your own experiment –

oSubscriptionFormCustomization = {

    forActiveSubscriptionView: function (selectedControl) {
        "use strict";
        debugger;
        var currentGridName = selectedControl._controlName;
       
      
        var excludedPayRun = "ActiveSubscriptions";
        if (currentGridName == excludedPayRun) {
         return true;
        } 
    else { return false; }
    },
    
    forInactiveSubscriptionView: function (selectedControl) {
        "use strict";
        debugger;
        var currentGridName = selectedControl._controlName;
      
      
        var excludedPayRun = "InactiveSubscriptions";
        if (currentGridName == excludedPayRun) {
         return true;
        } 
    else { return false; }
    }
};      

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!

Customer Lockbox (preview) in Power Platform Admin Center | Dynamics 365

Often, it’s a dilemma for partners when Microsoft support asks for access to the environment or making a “copy of the affected environment” in order to review an issue at hand. This is a super-helpful feature where we get to see what is being accessed in order to review data.

Microsoft Docs Link to Customer Lockbox (preview) – https://docs.microsoft.com/en-us/power-platform/admin/about-lockbox?WT.mc_id=DX-MVP-5003911

Please note that this is a preview feature and not meant for Production use. Currently, this also doesn’t cost anything and a cost will be associated once this is out of preview. Read the above Microsoft Doc to learn further.

Let’s look at the summary of this feature –

What is this feature?

  1. If you raise a Microsoft Support Ticket or Microsoft identifies an issue with your environment and needs to take a look at data, this feature comes handy in providing controlled access to data.
  2. If any issues need Production data to be investigated which could be business-sensitive, you can provide controlled access to Microsoft Support and also review/Audit such an access.

I’ll update further on –

  1. Whether review requests can be raised by partners who don’t have production access but have access to Sandboxes only based on Security Group practices some organizations generally follow. Or is only Microsoft can initiate a request?
    Here’s a post I put up in Power Platform Forum for the same – https://powerusers.microsoft.com/t5/Power-Apps-Governance-and/Customer-Lockbox-for-partners-same-tenant-access/m-p/1685530#M6849
  2. What is costs since in preview (at the time of this post), this is free-of-cost but will be chargeable once out of Preview.
  3. Once I create an actual Support Ticket with Microsoft and if they request access to Production data, I’ll configure a Lockbox scenario and update this blog further.

Customer Lockbox settings in PPAC

In Power Platform Admin Center [PPAC] (https://admin.powerplatform.microsoft.com/) –

  1. Look for Customer Lockbox (preview) under Policies section as shown below.

  2. Once you are in Customer Lockbox, you’ll see a button to start Configuring Customer Lockbox. While in preview, this is free – Later, it will be chargeable.

  3. Once this turns on in a few moments, you can see the message come up explaining how the Customer Lockbox will be enabled in 24 hours.
    The message reads – “For the duration for the preview, enabling Customer Lockbox will apply to all environments in the tenant. This capability is available in preview at no cost. When this feature becomes generally available, there will be a cost associated with environments protected by Customer Lockbox.

  4. Post this, you can turn the switch On and Save the settings. It’ll take 24 hours to take effect.

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Flows stuck in Waiting state | Concurrency control and Degree of Parallelism in a Power Automate

In case you are using Flows that triggers frequently and have steps in them your Flows to wait for a response, like Approvals.

Scenario

Let’s say you have Flows which use Approvals – These need to wait till the recipients respond to the Approval on their Emails

  1. The Flow which is waiting for an Approval response will be in Running state

  2. And if you open them, you’ll see this –

  3. And that makes the other Flow runs after that “Waiting” to even start.

  4. And that’s because the Flow trigger has something called as Concurrency turned on and has a certain Degree of Parallelism set which we’ll see in the section below.

Concurrency Control and Degree of Parallelism

The reason the other Flow runs were waiting because the Flow Trigger had the Concurrency control turned ON and the Degree of Parallelism set to a certain number between 1 to 100

  1. Open settings on the Flow trigger.

  2. You’ll find that the Concurrency is turn ON. And the Degree of Parallelism is set to a certain number.
    The number set is the count of Flow Runs that are allowed to Run at once and others will be waiting.
    In this case, only 1 Flow Run was allowed. Hence, the others were waiting.


  3. You can now try to turn this off.

  4. Now, when you try to turn this OFF and then save the Flow, you’ll see this error message –
    Flow save failed with code ‘CannotDisableTriggerConcurrency’ and message ‘The trigger ‘When_a_row_is_added,_modified_or_deleted’ of current version of workflow ‘fd33f44a-d6ad-4f06-bbf8-a693b316fa31′ has concurrency runtime configuration specified. Trigger concurrency runtime configuration cannot be removed once specified.’

  5. Hence, this has to be taken care at the beginning when you start designing your Flow. Or, you can use Undo to revert till the step when you turned this ON.

  6. When Concurrency control is turned off, Flow runs can continue to run in parallel without limitations or dependency on other Flow runs.

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!

Modern Advanced Find in Dynamics 365 CRM | Model-Driven Apps

Till now, you were using the classic Advanced Find experience in Dynamics 365 CRM from the very beginning. Now, let’s look at a brand new experience in Model-Driven Apps.

When Modern Advanced Find is not enabled, you’ll see your classic Advanced Find as usual. That’s how you identify that the new experience hasn’t been enabled yet.

Now, let’s see how the Modern Advanced Find will change things in your experience.

Turning On Modern Advanced Find

You can navigate to Power Platform Admin Center [PPAC] (https://admin.powerplatform.microsoft.com/) and then ensure the Dataverse Search (formerly, Relevance Search [Reference: https://powerapps.microsoft.com/en-us/blog/goodbye-relevance-search-hello-dataverse-search/?WT.mc_id=DX-MVP-5003911]) is enabled –

  1. Navigate to Power Platform Admin Center and go to the environment’s Settings –

  2. Then, navigate to Settings.

  3. Turn on Dataverse Search. Here’s another post of mine which puts light on configuring Dataverse Search for your environment – https://d365demystified.com/2021/10/25/configure-dataverse-search-in-power-platform-admin-center/
  4. Then, scroll further down to find the Modern Advanced Find option too. Assuming it will be off till now, turn it on and save the Settings.

Modern Advanced Find

Now, you’ll notice how Modern Advanced Find works –

  1. You’ll first notice that the legacy one has been removed from the Navigation bar itself.

  2. Now, when you click on the Search bar itself, having the Dataverse Search turned on itself, you’ll notice at the bottom the option for Advanced Find.

  3. This will open up on a pane and the first thing expected is that you select the table you want to search in.

  4. I search for Cases.

  5. When you click Continue, you wait for a moment till the screen populates the Filters for you based on the current view you are on or the Default view for the entity.

  6. In case you have used these filters before, you can continue to modify these and add more criteria.

  7. Typically, your Advanced Find view can start to look like this, once you are satisfied with the criteria you need to filter with, click on Apply.

  8. Once the results appear on the view itself like any other entity view, you’ll notice that the view name is now with a * mark. Like, an unsaved record/view. This view will have your custom results.

  9. Now, when you expand the View menu, you’ll notice a few buttons at the bottom.
    Save as new view and Manage and share views

  10. I’ll save this into a new view and name it something relevant to me.

  11. Once I save this, it’ll be my new Personal View denoted with a person glyph. Also, I can select the bottom Manage View option to take actions on the views visible to me.

  12. In the Manage and share views pane, I can see all the System and Personal views and take actions on them.

And that’s it!
Further, I’m waiting updates on how we can do the following which we used the classic Advanced Find for –

  1. Export to Excel buttons (although, you can use the main ribbon’s Export to Excel buttons) – It would take a moment for you to realize if you are used to using the Advanced Find window’s buttons themselves.
  2. XML Export

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!

Do Until action in Power Automate

Let’s look at what Do Until Action does in Control connector in Power Automate. In case you are a newbie or have used Power Automate till now to some extent, hopefully you find this post useful and easy to understand.

Explanation

Do Until will run iterations till the condition value is False. Once the value becomes True, it will break out of the loop.

Do Until

Here’s what the Do Until action will do –

  1. If you search for Control connector or the Do Until action itself, you’ll see this.

  2. Now, let’s see what the control parameters are and how we can use the condition to define how the Do Until will run.
    Explanation: We have a variable Text Input with value “A“.
    And, we want to run the Loop in Do Until till the value of Text Input becomes “A“.

    However, if the first iteration of the Do Until itself has Text Input = A, it will still run 1 iteration and then break out of the loop and not skip the loop right away.

  3. Now, in the body of the loop, I’m setting the value of the same variable “Text Input” = “B”.


    Here, the result will be the loop will outrun the maximum no. of iterations because the condition of Text Input = “A” was never true except for the first iteration as mentioned in #2 above.

    I’ll explain in the next section why it ran for 60 iterations.

  4. And, if we set the Text Input = “A” in the body of the loop, the first iteration will run and in the next iteration, it Text Input = “A” will be true and hence, break out of the loop and not execute any further.


    So as mentioned above, the 1st iteration will run and the next iteration will detect the true value and exit out of the loop since the loop was supposed to Run till the value of Text Input = “A


    Now, let’s look at why the iteration ran a certain number of times.

Change Limits

As you noticed by now, there’s a section called as Change Limits in the Do Until connector, let’s see what parameters can be set.

  1. Once you expand the Change limits section, you’ll see 2 parameters – Count and Timeout.

  2. Count will be the maximum count the iterations should run in case the value never becomes true.
  3. Timeout will take the time duration of how much time the loop should continue to run mentioned in https://en.wikipedia.org/wiki/ISO_8601 (ISO 8601 format).
  4. At least 1 property is mandatory for you to execute Do Until.

Hope this helps!

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

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

Thank you!

Create a Dataverse for Teams environment and add a Canvas App in a Channel

If you are used to creating environments in your Power Platform Admin Center (https://admin.powerplatform.microsoft.com/) and wondering how you can create a Dataverse for Teams environment, you can check this post –

So by default, you cannot create a Dataverse for Teams or (Microsoft Teams) environment in your Power Platform Admin Center and it looks like this

Go to Teams

Navigate to the Teams itself and we will take it from there –

  1. When in Teams, click on the three ellipses and search Power Apps in the App Store within Teams to install Power Apps.

  2. Now, click on Add.

  3. Once this is Added, you can start creating your first App. This will create the Dataverse for Teams environment which you will later see in Power Platform Admin Center.

  4. Once you start, you need to select at least 1 Channel from the list – without which you cannot proceed to creating your first App in the Power Apps for Teams.

  5. Then, I select one of the channel I want the App to be in and click on Create.

  6. Then, it takes a few moments to provision the same. Meanwhile, the Microsoft Teams environment is created in you Power Platform Admin Center of type Microsoft Teams.

  7. The Org looks like this when you click on it as shown above. (We’ll come to this later)

  8. While in Teams, you’ll probably see this – Ignore it or hit Retry.

  9. Once you click on Retry, you’ll see the same Power Apps main page.
    Now, do the below till #13 only if you want to create a new Canvas App in your Dataverse For Teams Environment. Else, you can directly go to the Channel itself to add the app which I’ll show in the next section.
    To create Canvas App – Click on Create an App again and this will open the new Power Apps Studio Editor

  10. And because I see the error in #8 above, I again had to select the channel I want to create my App in.

  11. Now this time, I’m given this Editor where I can mention the name of the App.


  12. App will be created and you’ll see it in Recent Apps in your Power Apps in Teams. It may take a few moments for the Recent Apps section to appear for you.
    Click on Publish to Teams to make the App live to use.

  13. Here’s how the Recent Apps section will display the App you just created.



Adding an App to a Channel

Now, here’s what you do when you want to add an existing App to the channel in Teams –

  1. Now, let’s say that you have worked on your App and that you want to show it on the Tab in a Teams channel, click on Publish button once you are done with Editing the App.


    You’ll see this, click Next if you don’t want to Edit any other details.

  2. Clicking on that, you’ll be asked the channel you want to make this available to.


    You’ll see the Dataverse for Teams environments, then click on the + sign. It’ll then show the Tab on which the App will be shown.

  3. App will be published on that Channel.

  4. In the Power Platform Admin Center, under the Environment, you’ll see the App listed as well.

Hope this was useful! Here are some Power Platform posts you want to check out –

  1. Show only configured Activities Related records section | Power Platform Admin Center
  2. Reflecting Metadata changes in Flow for Dataverse connector
  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!

Skip requirement to enter authentication method in M365 Login | Turn off Security Defaults

If you newly created a an M365 tenant, this is what you’ll be forced to by to enter authentication methods in this Security Defaults feature –

In most cases, even clicking on Skip for now option doesn’t help and I’m forced to enter an alternate authentication method.
Ideally, for Production purposes, you should keep this turned on. Only if you are on a trial and the tenant you are working on is for learning purposes, it is OK to turn this off.

Turn Off Security Defaults in Azure Portal

Here’s how you can turn off the Security Defaults requirement from the Azure Portal –

  1. Navigate to Azure Portal (https://portal.azure.com)

  2. Again, you’ll see this message so you can choose to skip this since we want to disable the Security Defaults.

  3. Then, go to Azure Active Directory

  4. Once in Azure Active Directory, look for the Settings in the left hand pane.

  5. In Properties, at the bottom you’ll see the Manage Security defaults button.

  6. It would be turned on by default (Yes) which you’ll need to switch to No.

  7. Once you switch to No, you’ll need to select either of the below reasons as to why you are switching it off. I just entered N/A in the Others reason, your reason could be different.

  8. Once you Save it, that’s all. Now you can just close the Window and try to Login again.

Logging in without Security Defaults

When the Security Defaults is turned off, you can see that the login screen will no longer ask you to enter an authentication method –

  1. When you enter password.

  2. And when you sign in, you’re no longer asked to enter a method for authentication and you’re already logged in past that step.

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Project Approvals are stuck in Queued status | PSA / Project Operations Quick Tip

Let’s see if you recently experienced changes in the way you do Approvals in PSA/Project Operations and your Approvals are stuck in Pending/Queued state, here’s what you can do.

Scenario

Recently, if you noticed some changes in your existing PSA/Project Operations – Approval Sets feature has been introduced that needs tweaking for it to work correctly for you.

You might observe that the Approvals are stuck in Queued status for infinite time and you don’t know when they will be successfully approved.
And they appear something like this –

Approval Threshold in Project Parameters

Now, navigate to Project Parameters as below –

  1. Once in Project Service App, go to Administration area and look for Parameters.

  2. In the Project Parameters record, you’ll find this field called as threshold.

  3. Then, you can enter a Threshold number so that your Approvals are not stuck when you Approve them.


  4. Then, Approve the Time Entries again (from Project Approvals). And they should go through this time.

  5. You’ll see a message that it will denote that the Approvals have been queued for Approvals and that they will be Approved. Then, you can look at the My Past Approvals view to find the completed Approvals view in Approvals.

You can read official Microsoft Docs on Modern Approvals in Project Operations here – https://docs.microsoft.com/en-us/dynamics365/project-operations/psa/approval-set?WT.mc_id=DX-MVP-5003911

Hope this helped!

Here are some more Dynamics 365 Administrator related posts you might want to check –

  1. Enable Plug-in Profiler in Settings area in SiteMap in Dynamics 365 | [Quick Tip]
  2. Disable Recent Records from Dynamics 365 Lookup Control | Model-Driven Apps [Quick Tip]
  3. Language format for Whole Number field in Dynamics 365 CE
  4. Custom Help Pages and Guided Tasks for Unified Interface in Dynamics 365
  5. Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip
  6. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power Platform
  7. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  8. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  9. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]
  10. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365

Thank you!

Create Application Users for Dynamics 365 environment | Power Platform Admin Center

Here’s how you now set up Application Users in Dynamics 365 CRM from the Power Platform Admin Center instead from the Classic UI and let’s see how the process is eased.

Classic UI

Previously, you used to see Application Users view in the Dynamics 365 CRM under Settings > Security > Users.



But it’s not longer available. Instead, you now go to the Power Platform Admin Center.

Register App in Power Platform Admin Center [PPAC]

Now, once you are in the Power Platform Admin Center, you can go to the Environment section –

  1. First, let’s say this is your App in your Azure’s Active Directory in the App Registrations. And now you want to create an Application User in Dynamics CRM for this App.

  2. Now, you can go to the PPAC and in Environments, look for your D365 CRM/Dataverse environment.

  3. In Settings, you’ll see Users, expand the same and you’ll see Application Users which is now it’s own separate option.

  4. Now, you’ll see the Registered Apps I have already and you can add from the “+ New App User” button above.

  5. Now, select the + Add an app button

  6. And you’ll see the complete list of all the Apps that are in your Azure’s Active Directory. Select the one your just created and click Add.

  7. And then finally click Create once you Add the App you want to create Application User for.

  8. And now, you’ll see the App added as an Application User for your environment.

  9. Now, you also need to provide Security Roles based on the requirement. Select the App User, and click on Edit security roles once available.

  10. In my case, I’m giving 3 Roles which I need to give and click Save.

  11. Now, I’ll also see how many Roles have been given to the App User.

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

  1. Setup Postman to connect to Dynamics 365 CRM using OAuth 2.0 | Azure App Registration
  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. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  9. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  10. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  11. Call Azure Function from Dynamics 365 CRM using Webhooks
  12. Show Ribbon button only on record selection in Dynamics CRM
  13. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Retrieve day number from a Week, Month and Year & day name in Power Automate

At times, while working in Power Automate, you might only want to retrieve the number of Day / Month / Year / Time etc from the DateTime. Or even just the name of the day, given the date.

Here’s a set of functions in Power Automate you can use already!

Day number functions in a Flow

Let’s look at a few examples on how you can retrieve parts of a DateTime –

  1. Let’s use a String variable to store all this content in an on-demand Flow.

  2. And in the Expressions section, look for the day functions.

    dayOfMonth()
    dayOfWeek()
    dayOfYear()


    All three functions take a DateTime timestamp


  3. Example, for simplicity, I’m only considering utcNow() function to refer to the current DateTime instead of using a DateTime variable.
    So, I’ll first use dayOfMonth() function

  4. And this gives me the day # of the Month which is equal to the Date itself.

  5. dayOfWeek will give me 0 for Sunday, 6 for Saturday.



    Since the day of writing this post is a Sunday, it will give me 0.

  6. And dayOfYear() will give me the day number of the year.


    And today is Day 72 of the year.


    First day of the Year starts with 1. You can use the below function to check the first day of the year in dayOfYear() and it will return 1.

  7. And the result is as below –




  8. I also have a previous version of this post as well which you can refer here – FormatDateTime function in a Flow | Power Automate

Name of the Day

If you want to simply retrieve the Name of the day, you can get it using FormatDateTime function –

  1. So, in other context, I simply used FormatDateTime() function.

  2. And got the below answer –


    You can find complete reference of the DateTime formats used in Power Automate in Microsoft’s official post here – https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings?WT.mc_id=DX-MVP-5003911

Hope this was useful!
Here are some more Power Automate posts you might want to check –

  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!!

Setup Postman to connect to Dynamics 365 CRM using OAuth 2.0 | Azure App Registration

If you want to test the WEB API in Dynamics 365 CRM using Postman, here’s what you need to do to setup Postman to connect to Dynamics 365’s Web API

There are 2 parts to this setup –

  1. Registering an App in Active Directory.
  2. Configuring Postman to utilize the App to connect to Dynamics 365.

So, let’s look at how we do this!

Register an App in Azure

The first step is to register an App in your Azure’s Active Directory so that you can use it to test using your Postman on your machine –

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

  2. In AAD, look for App Registrations.

  3. Now, register a new App in the App Registration

  4. Enter the details of the App Registration so you can identify what the App is for. Since I’m using this for Postman testing, I’ll enter something like – “Postman WEB API
    Also, since in most cases your Azure environment could be different, it’s recommended to select Accounts in any organizational directory (Multitenant), but it’s up to you based on how you can to secure this!
    Since, I’m testing on my local machine using Postman, I’ll enter http://localhost

    And finally click on Register.

  5. Once this is registered, you’ll see the details like any other Azure resource and look for Client ID and copy the same and save it somewhere temporarily.

  6. Next is updating the Manifest to support this setup.
    Set the “allowPublicClient” flag to true and “oauth2AllowImplicitFlow” to true as well.

  7. Once the Manifest is updated, it should look like this –

  8. Final step is to give permissions for Dynamics 365 to this App we just created. Go to API Permissions tab from the left-hand menu and click on + Add a permission button.

  9. Look for the Dynamics CRM option and select it.

  10. Select it and then click on Add permissions.

  11. Once added, you’ll need to Grant Permissions. At this moment when it’s not granted, the Status can be seen as blank.

  12. Select Yes to Grant Permissions.

  13. Once granted, the Status will be updated as follows – the status of Granted for [OrgName] will appear

  14. And we are done setting up the App in Azure Portal to be utilized by Postman to test Dynamics 365 Web API locally.

Setting up Postman

Now that we have the App setup, open Postman and we’ll utilize the above created App to establish a connection with Dynamics 365 CRM using OAuth2.0 –

  1. In your Dynamics 365 CRM environment, capture the OAuth URL in your Customization > Developer Resources section

  2. Enter this in a new Tab in your Postman and if you directly try to test this, you’ll get 401 Unauthorized.

  3. Now, we’ll have to configure the Authorization tab to be able to authenticate into Dynamics 365 CRM using the App registration we created in Azure in steps above.

  4. Now, enter the details we have captured so far –
    Token Name – Enter a suitable Token name
    Grant Type – Select Implicit if not already set.
    Callback URL – The callback URI should be http://localhost based on what we set in Azure in above steps.
    Auth URL – Here’s how you can get the Auth URL for your Dynamics 365 environment -> OAuth 2.0 URL for Dynamics 365
    Client ID – This should be what you saved above from the Azure App Service. Refer to step #5 in the Setting up App in Azure section above in this post. This should be the Application ID.

    Once all this is entered, click on Get New Access Token

  5. Once you click on Get New Access Token, you’ll need to authenticate into the environment as you usually get while connecting from Browser.
    Enter credentials and authenticate.

  6. Once this connection and the permissions are correctly validated, you’ll get a message like this –

  7. And it’ll show you this dialog box where you need to simply click on the Use Token button.

  8. You’ll then see the token as below –

  9. And you’re set!! Now, you can simply test using Postman.

Testing using Postman

Now that you are authenticated, you can click on Send and see that you are now able to retrieve the Web API

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Analytics of a Flow in Power Automate

Let’s understand how you can look at a Flow and check the Analytics it generates as the Flow is being used.

The maximum Analytics generated for a Flow is 30 days and not beyond that at this point. This might change in the future.

Analytics on Flow

Open a Flow in Power Automate and let’s see how we can access the Analytics of a Flow –

  1. When inside a Flow, you’ll see and Analytics button in the menu.

  2. Or even if you are in the list to view all the Flows, you’ll see them like this –


  3. In the Analytics Page, you’ll find a first tab you’ll find is a Actions tab which loads a PowerBI Report load and show something which is called as AggregationDateMakerDailyActions and BillableActionsMakerDailyActions which show the total Actions being executed per Flow run on a daily basis.

    I know this might be a little overwhelming, hence, here’s a reference Document to understand the same –
    Introducing action analytics in Power Automate – https://powerautomate.microsoft.com/en-us/blog/introduction-action-usage-analytics-in-power-automate/?WT.mc_id=DX-MVP-5003911

    And here’s a Microsoft Doc on understanding Request Limits and allocations – https://docs.microsoft.com/en-us/power-platform/admin/api-request-limits-allocations?WT.mc_id=DX-MVP-5003911

    Please note that the maximum range you can go back to get this data is 30 Days!



    Let’s look at the other 2 tabs –

Usage

Under the Usage tab, you’ll see how many Flow Runs were Successful vs Failures [Example taken from another Flow since I had to capture some failures too 😊]

Errors

In the Errors tab, you’ll see which all Flow Runs failed on what types or Errors. This is helpful in understanding the different issues the Flow needs to be addressed for –

  1. Below is how you’ll see the different types of Errors all the Flow Runs are divided amongst.

  2. And if you see the list of Failures, you’ll see that there is a hyperlink to each of the Flow Run itself.

  3. Clicking on these, they take you to the actual Flow Run itself.

Hope this was useful!
Here are some more Power Automate posts you might want to check –

  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!!

Auditing Enhancements for Dynamics 365 CRM in Power Platform Admin Center

Audit Management has improved lately in the Power Platform Admin Center (https://admin.powerplatform.microsoft.com/), let’s review what’s new!

Auditing in Power Platform Admin Center

Given that you are in the Power Platform Admin Center, let’s look at an org CFT 158’s Audit Settings –

  1. You’ll now see an Auditing section in the environment –

  2. And if you click on Manage as shown below, you can see what all is Enabled / Audited.


    In Manage, you’ll see the below Auditing enabled and also how long the Audit Logs can be Retained for –

  3. And you can choose for a particular environment, as to how long you want to retain the logs for. Let’s say, you don’t want to retain Audit records for Sandbox environments for more than a certain time.

Audit Log Deletion

Now, you have the ability to select what Audit Logs you want to delete based on a certain Table, People/System or from selection of Dates. –

  1. Under the Free up capacity label in the Auditing summary on the Environment in PPAC, you’ll find a link for Delete logs.

  2. In this menu, you’ll be able to select what Audit Logs you want to delete.
    You can select from within a Table, Date selections or Access logs, by people and systems.



  3. Beginning to Date Range
    Now, let’s select by Date i.e. Deleting Logs from beginning and up to the selected Date.
    Now, these are the Audit records for a sample account.

  4. Now, I’ll select a Date i.e. 5th Jan – so, it’ll delete the Audit everything till 5th Jan (will leave 5th Jan probably because of the Timezone issue on my end.)


  5. And once you set this, you’ll be asked for confirmation.

  6. Once you confirm, a Bulk Delete System Job will run and look like below

  7. And if I check my System Jobs (It probably left out 5th Jan’s logs because of time zone not set correctly)
    And everything prior to 5th Jan will be deleted.

  8. So, to verify this, I added 1 more Auditing record and then ran another job for 6th Jan to verify if 5th Jan is deleted or not.

  9. And it deleted the 5th Jan records

  10. Table
    Now, you can also select a specific table/entity you want to delete Logs for.

  11. And select the Tables you want retaining others. I choose Contact for example.

  12. And it’ll ask for confirmation as well. Once I select Confirm, it’ll Delete Audit Logs only for Contact.


  13. And the third type is to delete the Access Logs.

    Note: Please note that at times, some Bulk Delete Jobs could be waiting to be submitted.

Hope this summary was useful!

Here are some more Dynamics 365 Administrator related posts you might want to check –

  1. Enable Plug-in Profiler in Settings area in SiteMap in Dynamics 365 | [Quick Tip]
  2. Disable Recent Records from Dynamics 365 Lookup Control | Model-Driven Apps [Quick Tip]
  3. Language format for Whole Number field in Dynamics 365 CE
  4. Custom Help Pages and Guided Tasks for Unified Interface in Dynamics 365
  5. Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip
  6. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power Platform
  7. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  8. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  9. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]
  10. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365

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!!

Ribbon button visibility based on a null value in field in Dynamics 365 | Ribbon Workbench

In case you are using ValueRule already for showing / hiding a ribbon button, but wondering how you can check for the same field for null values i.e. showing the ribbon button only when the field contains data?

I’ll explain in this post –

You can also refer this post for showing/hiding button based on a certain value – https://d365demystified.com/2021/01/08/ribbon-button-visibility-based-on-a-field-value-in-dynamics-365-ribbon-workbench/

ValueRule

Let’s consider an example where you want to show a Subscription button based on the Group Code field on the Account form –

  1. I have a Group Code button on the Account Form, if this contains data, only then the Subscription button/flyout button should show.

  2. So, in the Ribbon Workbench, you can select your button and start by adding a Display Rule (Assuming you don’t have other Display Rules already set which you’ll need to take care of)

  3. In the Display Rule, you can select the type as ValueRule

  4. In the value Rule, the field you are checking for in this example is Group Code (Name: cf_groupcode)


    At this point, if I leave the Value as blank in the above screenshot, the button will be hidden if the value is blank in the above shown Display Rule. This acts as Show when “Group Code Does Not Contain Data

    In this case, the button will be shown when the Group Code field is blank.


    And hidden when the Group Code field Contains Data


  5. Now, if we choose to Invert Result, you’ll get this – This will act as Show when “Group Code Contains Data


    Now, in this condition, the Ribbon button will be shown is the Group Code has data in it.


    And will be hidden when the Group Code field is blank.

Also Ensure

If you are wondering if your changes are being applied, also cross check the below two points –

  1. The Command must be attached to the button.

  2. And the DisplayRule must be attached to the Command itself.

Hope this was useful!

Here are some more XrmToolBox related posts which you might want to check –

  1. Create a Flyout menu for ribbons in Ribbon Workbench | XrmToolBox
  2. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  3. Connecting XrmToolBox to an MFA enabled Dynamics 365 environment | Azure AD
  4. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox
  5. Delete App Passwords created by other users in Office 365 | Multi-factor authentication
  6. Single record and multiple record auditing in Dynamics 365 to Audit record access | M365 Compliance
  7. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  8. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  9. Ribbon button visibility based on a field value in Dynamics 365 | Ribbon Workbench
  10. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  11. Pass Execution Context to JS Script function as a parameter from a Ribbon button in Dynamics 365 | Ribbon Workbench

Thank you!

Try Catch error handling using Scope in Power Automate

As a programmer, using Try-Catch is a common programming practice to handle exceptions. Now, since we’ve moved more towards low-code platform implementations, error handling here is a must as well.

Generally, if a Flow fails as per below, we should be able to handle the exceptions effectively –


And this is what happened to my action step –

And this Flow will end in Failed Run status. So let’s ensure we handle this in a simple way.

Group actions using Scope

First step is to club the actions into a group which can be accomplished by an action called Scope. This will give us controls as to what happens if this Scope fails, succeeds, times out or is skipped –

  1. Search for Scope in the Flow and add it.

  2. Now, add the actions which needs to be handled for Exceptions in the Scope you just added.

  3. And it should looks like this – Also, consider renaming the Scope as you might want to handle each section of the Flow differently for different potential actions


    Here, your Try block is ready.
  4. Now, let’s design the Catch block. Add one more Scope to the Flow (Ideally, after the Try Scope we just added)

  5. For example, you can add an email step to notify the developer, typically.



Configure Run After

Now, let’s configure the Run After on the ‘Catch SP Exceptions‘ scope we added in the step above

  1. Now, go to the ellipses on the Catch scope we just created.
    You’ll find Configure Run After. This defines that when should this selected Scope Run based on the results of the previous Scopes.

  2. And you can select the criteria you are defining for the ‘Try – SharePoint Actions’ scope’s results.
    The below implies that run ‘Catch SP Exceptions’ block after the ‘Try – SharePoint Actions’ block failed (or any action in it fails)

  3. And at this point, you are done. You can see a little i icon to see what is configured.
    The arrow connecting the steps are also different (in brown as compared to other black/dark gray arrows.)

Testing

Now, let’s test this simple scenario and see how the executions will take place in terms of error.

  1. We’ll resubmit the same failed Run to now go through these Scopes and observe our course of action.
    As you see below, Try – SharePoint Actions scope has failed as expected but because we had configured the Catch SP Exceptions to Run After the Try – SharePoint Actions failed.
    And note that the End Result of the Flow is also a Success.

  2. Now, let’s see what happens if the Exception doesn’t occur and it succeeds.
    But, notice that even the steps after the Catch SP Exceptions didn’t execute.
    Now, I’ll explain below why that happened.

  3. This happened because Catch SP Exceptions itself didn’t execute and the Delay step is connected to Catch SP Exceptions steps by default.
    Now, you’ll need to also configure the Delay Step to Run After the Try – SharePoint Actions is Skipped executed. Then, the Flow will continue it’s normal execution that point on.

  4. And if you Run this again, since the Catch SP Exceptions is Skipped, the Delay will continue to Run.
    And everything after that. See another step added to validate this.

Hope this was quick and easy to understand.

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!!

Remove attachments from Dynamics 365 CRM Notes using Power Automate | Dataverse

If you are looking to remove or delete the attachments from Notes (Annotation entity) in Dynamics 365 CRM / Dataverse (and not delete the Note itself), hopefully this will help!

Disclaimer: I’m not covering ‘how you can save your attachments elsewhere’, I’m only covering how you can delete from Notes given that you have handled your attachments before deleting them.

Identifying Attachments

Here are some points which will help you identify once attachments are included when you create a Note in Dynamics 365 / Dataverse.
Note that these are not in Attachments entity.

  1. You can have a Flow that is triggered on the create of a Note (annotation) in Dataverse.
    So here, the Document is Note is attached on a Note.


    And the Trigger of the Dataverse connector in Flow is on the create of a Note

  2. And when the Note is attached, the triggerOutputs body will show this data that denotes the attachment on the Note.

Clearing Attachments

Here’s how you can clear the attachments from the Notes (by not deleting the actual note). If you want to move to SharePoint, it’s a recommendation, but that’s not something I intend to cover here (Assuming you are doing something with the attachments and then wanting to delete them) –

  1. Now, in this example, I’m attaching a Note which will be further cleared using the Update step which I’ll show.


  2. Here’s an update step I have on the same Note which will set the Document Body & Name to null in order to clear the attachment.



  3. To test this, I had another Flow which is triggered on the update of the Note i.e. the step above.
    Once there’s nothing in the Document (documentbody), the filesize will be 0 & isdocument flag to false automatically. Also, setting the Name to Null is important – Else, you’ll still see the attachment on the Note (Just that you can’t open it)


  4. And when you refresh the Timeline, you’ll see that the attachment is now removed.

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!!

Dynamics 365 JavaScript Client Scripting for Beginners | [Video Series]

Hi! If you are a newbie to Dynamics 365 JavaScript, I’ve made a short series on the same from a Beginner’s perspective.

I’ll keep enriching this series with advanced topics soon.

Pre-Requisites

In order to be able to start JavaScript form scripting for Dynamics 365 CRM / Model-Driven Apps, you must have the below –

  1. Beginner to moderate JavaScript knowledge
  2. Visual Studio or Visual Studio Code
  3. System Customizer / System Admin access to the Dynamics 365 / Model-Driven environment.

Also, for complete reference to Dynamics 365 Client Scripting, here’s the official Microsoft Documentation on the same – https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference?WT.mc_id=DX-MVP-5003911

YouTube Videos

Hope this was useful. In order to also look for a beginner series on writing Plugins for Dynamics 365 CRM / Dataverse, I’ve created a Blog Series for the same as well – Plugins Development in Dynamics 365 CRM for Beginners | [Blog Series]


Hope this is a helpful start!
Here are some more Dynamics 365 CE / CRM posts which you might want to check –

  1. Make Managed fields Required in Dynamics 365 – Managed Properties Error [Workaround] | D365 CE Quick Tip
  2. Sign up for a Dynamics 365 Project Operations (Lite Deployment) environment and provision a new instance | Power Platform
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]
  5. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  6. Connecting XrmToolBox to an MFA enabled Dynamics 365 environment | Azure AD
  7. Pass Execution Context to JS Script function as a parameter from a Ribbon button in Dynamics 365 | Ribbon Workbench
  8. Pass data to HTML Web Resource using browser’s sessionStorage in Dynamics 365 CE
  9. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365
  10. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox

Thank you!!

Plugins Development in Dynamics 365 CRM for Beginners | [Blog Series]

If you are looking to start Plugins development in Dynamics 365 CRM Online instance but are a bit digressed in the process, I’ve created this short Crash Course to help you get started with your first plugin on Day 1!

Here are the list of the posts –

  1. Setting up Visual Studio Projecthttps://d365demystified.com/2021/12/31/plugins-development-in-dynamics-365-crm-part-1-setting-up-visual-studio-project/
  2. Registering your pluginhttps://d365demystified.com/2021/12/31/plugins-development-in-dynamics-365-crm-part-2-registering-your-plugin/
  3. Adding Logichttps://d365demystified.com/2021/12/31/plugins-development-in-dynamics-365-crm-part-3-adding-logic/
  4. Debugging the pluginhttps://d365demystified.com/2021/12/31/plugins-development-in-dynamics-365-crm-part-4-debugging-the-plugin/

Further, I’ll enrich this series with posts on best practices and links to useful Tools and code samples by fabulous and brilliant community members! 😊

I hope this is a good enough starting point to you all.

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Plugins Development in Dynamics 365 CRM | Part 1 – Setting up Visual Studio Project

If you are a newbie to Dynamics 365 CRM and need to connect dots in getting your first plugin up and running, this post is for you! I’ve tried to summarized this in the shortest possible way. 😊 Hope this gets you going quickly!

Since you’re here, it’s presumed that you are told to learn or implement a Dynamics 365 CRM plugin with some business logic in mind based on the requirements. So, here’s how you get started in your learning journey!

Pre-Requisites

Here’s what you need to be have installed in order to proceed to writing a plugin –

  1. Plugin Registration Tool – Required for your to connect to the Dynamics 365 environment and deploy your plugin on.
    How to get Plugin Registration Tool: Download Plugin Registration Tool for Dynamics 365 CRM using PowerShell
  2. Microsoft Visual Studio – You’ll need to write your plugin in a Visual Studio IDE as it’s the preferred way to code your plugin and also to Version Control / Source Control.

Scenario

Now, before you decide why you have to write a plugin, it is presumed that you have some high-level understanding as to why you are writing this plugin.

To keep it short, here are some points –

  1. Understand Plugin Execution Pipeline (Basically, it means when is the plugin supposed to run when you perform a certain operation) – https://carldesouza.com/dynamics-365-plugin-execution-pipeline/

Example Business Scenario

Here’s a quick example we’ll consider which we will implement using a plugin –

  1. An account has a custom field called as Group Code.

  2. So whatever is updated in this field should be updated on all the Child Contact records under the Account.


    Now, let’s write a quick plugin to implement this.

Writing a Plugin – Visual Studio

Given that you want to start writing a plugin, you must also have understood some concepts –

  1. You’ll need to create a new .NET Framework Project in order to get started. I use Visual Studio 2022 (This was newly released at the time of writing this post)
    So the type of Project required is a Class Library of .NET Framework

  2. Once you click Next, provide a relevant name to the Project. As a D365 Consultant working on multiple projects, you should be able to identify the library/assembly by the name as to which Org and what Module it belongs to.
    In my case, I’m calling it CFT158SalesPlugins which is sufficient to give an idea of what org and what module this assembly is for.

  3. Once I click on Create, an Empty Project with the standard Class1 will be created which will be ready for you to start writing.

  4. Next, since Dynamics 365 CRM plugins extend IPlugin interface provided by Microsoft Dynamics, you’ll need to fetch references for the same.



    Now, right-click on the Project itself and click on Manage NuGet Packages…

  5. Then, go to Browse and then search for Dataverse…

  6. You’ll find Microsoft.CrmSdk.CoreAssemblies which you can download. I usually choose a little older version than the current one.

  7. Make sure you have selected the correct one. Then, click OK.


    Next, you get a chance to also look at the licensing terms before you Accept. Once you are OK, you can click on I Accept.

  8. If you have the Output window open in your Visual Studio, you’ll be able to see the progress. It only takes a few seconds for the references to be imported.

  9. Once done, you can see that the references required have now been added to the project.

  10. I’ll rename my Class1.cs to something that gives an idea of what the Plugin would do.
    So, for example, I’m setting it to AccountUpdate.
    Detailed post on Renaming or Deleting a Plugin in Dynamics 365 CRM
    Now, that my class is renamed, I’ll also add the references to the Class File so that I can use the IPlugin interface. In most common Plugin scenarios, you’ll need Microsoft.Xrm.Sdk amongst other references too.
    My personal practice is to include as shown below –


Setting Initial Methods

Now, let’s set a template of which we can start to code the plugin. Before we do that, some common Methods need to be added first.

  1. I’ll now extend the IPlugin interface to the class.

  2. As you choose the IPlugin, in Visual Studio, you’ll be prompted for some actions which will auto-complete the interface process. Look for the icon on the left hand side and expand the menu to find Implement Interface


    Once done, the Execute method will be populated as below. Execute method is the first method from where the plugin execution starts.
    Also, make sure the class is public so that we can register is successfully in the Plugin Registration Tool.

  3. Now, below are some helper methods which are required for the plugin to be registered on the environment.
    You can copy from here:

    context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
    service = ((IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory))).CreateOrganizationService(context.UserId);
    trace = (ITracingService)serviceProvider.GetService(typeof(ITracingService));




  4. In order to understand what these methods are, you can simply hover over these and read the definition. If you don’t understand these right away, it’s not a problem. But, it’s recommended that you thoroughly understand the purpose behind each of these.

  5. Then, this should be the first method to call in order to establish connection with the Dynamics 365 CRM organization you are hosting this plugin on.

  6. Next, you’ll need to Sign the Assembly before it could be registered on the environment using Plugin Registration Tool.
    Right-click on the Project and then choose Properties.

  7. Once in Properties, look for the Signing section on the left-hand side on the menu.
    Notice that the Sign the assembly is not yet enabled.

  8. Once you tick it, it’ll expose the area below and you’ll be able to create a new strong key name file.

  9. When I click on new, I created a strong name key file –
    Note: I’ve not password protected the Strong Name Key I’m creating but it’s up to you to maintain it if needed.

  10. Once I click OK, the .snk file will appear here.

  11. Finally, build the Project at this stage and we’ll move towards Registering this Plugin.

    Now, at this point, we have established the code which is ready to be hosted on the Dynamics 365 CRM organization itself. Post this point, you’ll now code the logic which is supposed to be done by the plugin.

But first, let’s move to part 2 where you’ll first host this assembly in the Dynamics 365 CRM environment!

Registering Plugin in Dynamics 365 CRM environment

Here’s the Part 2 of the Blog: https://d365demystified.com/2021/12/31/plugins-development-in-dynamics-365-crm-part-2-registering-your-plugin/

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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 a Flyout menu for ribbons in Ribbon Workbench | XrmToolBox

Here’s how you can create Flyout menu in Ribbon Workbench.
Also, for most ribbon customization, you can edit using the Command Editor in Power Apps but this is in Preview at the time of writing this post –

  1. How to add low-code Power Fx buttons to model-driven apps (Commanding v2) – https://www.develop1.net/public/post/2021/07/25/commandingv2
  2. Comparison between Ribbon Workbench and Power Fx Command Buttons –
    https://www.develop1.net/public/post/2021/07/25/RibbonWorkbench-vs-PowerFx

Meanwhile, here’s how you can create a Flyout menu in Dynamics 365 CRM Ribbon using Ribbon Workbench in the XrmToolBox

Ribbon Workbench in XrmToolBox

In classic XrmToolBox style, here’s how you create a Flyout button. Given that you are aware of how to load the Entity’s ribbon in a solution and then onto the Ribbon Workbench, we’ll see at how we can create a button on Account Form –

  1. Insert the Flyout menu in the Ribbon where you want to insert this. In this case, in the Form ribbon of the Account entity.

  2. Once dragged, pick a Menu Section control and insert into the flyout canvas shown in screenshot below. Because all the Buttons will fall under that Buttons can’t be added directly into the Flyout menu.

  3. Now, you can name the Menu Section itself as show below –
    Note: In case if you named the Section correctly and it didn’t appear the first time, clicking on some other component and then clicking it back will show it correctly.

  4. Now, you can insert buttons underneath the section. In this case, I’ll add 2 buttons for Pause and Cancel.


  5. Make sure you populate the Command and the ModernImage icon for it’s icon so that the buttons are visible when you publish. Without a Command being attached to the Button, the button will not be visible.
    The final button layout will look like this.
    Note: In case if you named the Section correctly and it didn’t appear the first time, clicking on some other component and then clicking it back will show it correctly.

  6. Once ready, publish the changes and see. Your Flyout menu will be ready and will look like this!

Hope this was useful!

Here are some more XrmToolBox related posts which you might want to check –

  1. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  2. Connecting XrmToolBox to an MFA enabled Dynamics 365 environment | Azure AD
  3. Find deprecated JS code used in your Dynamics 365 environment | Dynamics 365 v9 JS Validator tool | XrmToolBox
  4. Delete App Passwords created by other users in Office 365 | Multi-factor authentication
  5. Single record and multiple record auditing in Dynamics 365 to Audit record access | M365 Compliance
  6. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  7. Show custom ribbon button based on Security Role of the logged in User in Dynamics 365 | Ribbon Workbench in XrmToolbox
  8. Ribbon button visibility based on a field value in Dynamics 365 | Ribbon Workbench
  9. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  10. Pass Execution Context to JS Script function as a parameter from a Ribbon button in Dynamics 365 | Ribbon Workbench

Thank you!

Renaming or Deleting a Plugin in Dynamics 365 CRM

At times, if you realize you need to rename your plugin but get error while updating it in the Plugin Registration Tool, then this post might help you out!

Let’s see how we correctly rename the plugin in question and update it. Most times, if you encounter this error, make sure you follow the post to be able to successfully perform this operation.

Scenario

At times, there are scenarios where you need to rename a Plugin just because the naming convention has not been followed in the Plugin Assembly because multiple developers were contributing or just because you came up with a better name altogether –

  1. Let’s assume this is the name given originally in a plugin

  2. And you want to rename it to, say “AccountValidation
    So, you typically would rename the class file in the Plugin Assembly (Class Library)


  3. And it’ll ask you for the confirmation to update the name of the class as well.

  4. And once you confirm, the class will be renamed as well.

  5. Now, when you try to Build the solution & update the assembly again, it’ll show you your renamed plugin which you are trying to update.

  6. But, when you try to Update the Selected Plugin, it’ll give you the below error.
    [The previous Plugin name] not found in PluginAssembly [PluginAssembly details] which has a total of [x] plugin/workflow activity types.


    Let’s see how to overcome this.

Workaround

So, here’s how you successfully update the plugin assembly with the renamed plugin.

  1. Unregister the Plugin only which was renamed.
    Please make sure you note all the Steps and Images with that plugin since you’ll need to manually add them back again once the new renamed plugin is registered. It’s a new registration and not updating the existing plugin which was previously registered.

  2. Now when you unregister, re-update the Assembly in which the renamed plugin will be registered as a new plugin. Post which, you’ll need to add the necessary steps/images to it.

Deleting a Plugin

The approach to deleting a Plugin from the Assembly is also no different –

  1. Let’s say you have another plugin called as “ContactUpdate“, and you want to delete it to declutter your assembly from plugins which you don’t need at all.
    You select the Class file in Visual Studio and Delete it.

  2. It’ll prompt you that you are permanently deleting the file and it can’t be reverted.

  3. Once this is deleted, and you build the solution again and Update the Assembly, you’ll find that the plugin you deleted will be missing for an update. And that’s when you’ll see another error as the Assembly update in the Plugin Registration Tool will try to update the plugin you just deleted.

  4. Just like how we Unregistered in the rename process above, you’ll need to Unregister the plugin first in order to Update the rest of the plugins successfully in the Assembly.

  5. And finally, you’ll be able to update the assembly for the rest of the Plugins in the assembly post deleting the plugin.

Also, another way is to also follow the below –

  1. Create a new plugin with the name you wish to set.
  2. Copy the code over the new plugin and register it in the Plugin Registration Tool.
  3. Once done, replicate the Steps/Images on the new plugin in the Plugin Registration Tool.
  4. Now, you can also safely delete the old plugin which has the old name.
  5. Delete from the Code and then from the Registration Tool and then update so that the library too is updated with the deleted one as well!

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center

In this post, I will highlight on how you can enable SharePoint Online Document Integration with Dynamics 365 CRM and how these records are structured in SharePoint as well as Dynamics CRM.

Hope this post covers it for you to get started with Dynamics 365 SharePoint Online Integration! 😊

Pre-requisites

Here are the pre-requisites you need to make sure you can enable SharePoint Online integration with Dynamics 365 CE/CRM.

  1. With Dynamics 365 Online, you’ll also need SharePoint Online plan as well which is available with M365/O365 Plans. Example: E3

  2. Also, make sure you are Dynamics 365 Admin as well as SharePoint Admin as well. In case you happen to the be Global Administrator, even better! 😊

Before enabling SharePoint Integration

Before we enable SharePoint Integration, notice that Documents is not shown in related records under entities like Accounts, for example.



Power Platform Admin Center

You can visit Power Platform Admin Center (https://admin.powerplatform.microsoft.com/environments) to enable SharePoint Integration

  1. Navigate to Power Platform Admin Center (https://admin.powerplatform.microsoft.com/environments) and then to the environment with which you want to enable the SharePoint Online integration with –
    Then, go the to Settings of the Organization –

  2. Under the Integration section, navigate to Document management settings

  3. It’ll take you to the old Document Management Settings in Dynamics 365 CRM. Here, you’ll be able to select the Enable Server-Based SharePoint Integration

  4. The next dialog box will walk you through the steps to enable the SharePoint Integration with your Site. Click Next.

  5. Now, you’ll be asked if you want to enable for Online or On-premise. In this example, we are looking at Online, hence, Online will be selected and you click Next.

  6. Further, you’ll be asked what Site should the integration be enabled on.

  7. It should be the SharePoint Site you want to enable this to, so you can pick it from the SharePoint site itself. Copy the selected URL from your respected SP Site.


    And paste it in the box where URL is asked. Then click Next as shown below.

  8. Final step is to click Finish post the Site is found to be Valid.


  9. At this point, Documents will be visible on entities.

  10. But, if you navigate and try to enter Documents, you’ll see the error message saying that Site is missing

    This completed the first step of the process. Next step is to enable the entities for SharePoint integration of Documents.

Enable Entities for SharePoint Integration

In this section, once we have enable the Dynamics 365 environment for SharePoint integration, we’ll now enable the entities which we want the Document Integration to be enabled on –

  1. Now, you’ll need to enable the entities for Document Management


  2. In this, you have to make enter the URL of the SharePoint Site where you want the Document Library to reside. I’m entering the main SharePoint URL itself and we’ll see where this ends up.
    In this, make sure you select the Entities which you want to enable for Document Management.
    Most of common Business Entities are pre-selected, you only need to paste the URL of the Site location and you are good to click on Next.

  3. Next, it’ll ask the structure of the folders that should be created in the SharePoint.
    To understand Based on Entity, you can check this – https://d365demystified.com/2018/12/17/based-on-entity-folder-structure-in-d365-sharepoint-online-integration-in-d365/

  4. Once you click Next based on your selection, you’ll simply be prompted where the Document Locations are being created.
    You just need to click OK.

  5. Further, it’ll process the entities which were initially selected in #2 above.

  6. In a few moments, this will be completed.
    You can simply click finish.

  7. Once done, you can now check that the error in Account’s Document section is gone and you’ll see that the Documents grid is ready for Documents to be uploaded.

  8. And here’s the SharePoint Folder Structure created in SharePoint.


  9. When you navigate and even if you open the grid on the Dynamics 365 record, the folder is created in SharePoint even if you don’t upload anything.

  10. And for example, you upload a sample Document on the record

  11. It’ll appear in the Documents tab here.

  12. And also on the SharePoint library which we just saw

    Easy!!

SharePoint Site Structure in Dynamics 365

If you are further curious on what happens in Dynamics 365 and which kind of records are created, here you go –

  1. The first record to be created in a high-level is SharePoint Site.
    Under this, a Document Location record is created.

  2. And in this Document Location record, a Default Document Location is created which will house the other records

  3. And in this Document Location record itself (if you open the one marked in the #2 above)
    A child Document Location record is created [And this is created when you open the Document tab on the entity record itself]
    So, go to the Document Locations in related in the Documents on Default Site 1 itself

  4. And these are the records under the Child Document Location records.

    So this is what happens on a very high-level. 😊

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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Call Flow from Webhooks in Dynamics 365 CRM | Power Automate

In case you are wondering if there are other ways to call a Flow apart from just Dataverse connectors, well – There are ways! 😊

Here’s how you can use Webhooks registered on Dynamics 365 CRM to call a Flow in Power Automate using HTTP Request trigger

Pre-Requisites

Given that you already have Admin Access to create Flows with HTTP Request Triggers, you’ll need to have Plugin Registration Tool in case you are not familiar – Download Plugin Registration Tool for Dynamics 365 CRM using PowerShell

Initiate a Flow

Here’s how you start building your Flow –

  1. You must select the HTTP Trigger when you start a new flow. This will be your Flow trigger.

  2. Now, in order to be able to get the URL of the HTTP Trigger which you’ll need, you’ll need to save the Flow first.
    And for that, Flow needs to have more than 1 step. So just go ahead and add a variable, maybe. 😊

  3. Once you save the Flow, the URL will be generated which you can copy

  4. Copy this URL and paste it in the Notepad. We’ll come to it later.
    It should look like this –

    So we’ll come to this later. Let’s keep this handy in clipboard since you’ve copied it anyway and let’s move towards registering the Webhook itself.

Register Webhook in Dynamics 365 CRM

Given that you have Plugin Registration Tool and you are logged in, you can proceed with registering a Webhook in the environment –

  1. In the menu, select Register a Webhook option.

  2. Now, you can start by giving it a name.
    Then, in Endpoint URL – copy only till the work invoke
    https://prod-131.westus.logic.azure.com:443/workflows/6092c774224e498ebe413f3d7c05a45e/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gvfm52Mpnhsz4Ew4ufRllNM_VhfC6a-GkCpM7AigPU0

    Also, select the Authentication as HttpQueryString

  3. Now, coming the next part, you can start add properties to this –
    Green are the Properties, Pink are the Values

    https://prod-131.westus.logic.azure.com:443/workflows/6092c774224e498ebe413f3d7c05a45e/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gvfm52Mpnhsz4Ew4ufRllNM_VhfC6a-GkCpM7AigPU0

    Also, in case you are wondering what does the %2F mean – It’s the HTML encoding for a slash symbol “/
    Ref Link: https://www.w3schools.com/tags/ref_urlencode.ASP

    And, the properties should look like below –


  4. Now, you can go ahead and add a Step just like you would do in a Plugin assembly


    And then, for example, register a step on Associate. It could be any message.

  5. And, when you Associate a record, example – Assigning a security role to a User –

  6. The Webhook will call the HTTP Request Flow


    And if you open the Flow, you can expand the first step and see the Detailed outputs






  7. You can copy the above Outputs and use this to generate Schema for the HTTP Trigger so that you can use it further in the Flow


    And this is how it will be generated

Hope this helps!

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

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

Thank you!

Download Plugin Registration Tool for Dynamics 365 CRM using PowerShell

If you are new to plugin development, you must’ve learnt by now that you’ll need to download and install a Plugin Registration Tool in order to register your plugin with the Dynamics 365 environment you are working on.

In case you are on your own and someone hasn’t given you the zip file already, here’s how you can start from scratch. 😊

Download Plugin Registration Tool using PowerShell

Here’s how you start from the very beginning.

  1. If you do a quick Google Search, you might find someone must’ve already uploaded a Plugin Registration Tool somewhere, but in case you want to get it from Microsoft’s official website, here’s the link to Microsoft Docs – https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/download-tools-nuget?view=op-9-1&viewFallbackFrom=op-9-1%3FWT.mc_id%3DDX-MVP-5003911
    Then, you can directly navigate to the Plugin Registration Tool segment by clicking on the highlighted link below


  2. In Plugin Registration Tool, you can simply click on the Download Package button


    This file Nuget file will be downloaded to your machine –

  3. Now, open PowerShell in Admin mode –

  4. Now, write the below code in PowerShell [Make sure you are pointing to the directory where you want to install the Nuget.exe]
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" $targetNugetExe = ".\nuget.exe" Remove-Item .\Tools -Force -Recurse -ErrorAction Ignore Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe Set-Alias nuget $targetNugetExe -Scope Global -Verbose

    It’ll look like this when you type and press Enter, after a few moments when it’s completed downloading, you’ll be in the below state –

  5. Now, Microsoft Docs article above lists the PS Script to download all the Tools, but from that, if you want to only Download Plugin Registration Tool for now, that’s fine! You can just write the below PS Script and leave the rest –

    PS Script for Plugin Registration Tool only –
    ## ##Download Plugin Registration Tool ## ./nuget install Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool -O .\Tools md .\Tools\PluginRegistration $prtFolder = Get-ChildItem ./Tools | Where-Object {$_.Name -match 'Microsoft.CrmSdk.XrmTooling.PluginRegistrationTool.'} move .\Tools\$prtFolder\tools\*.* .\Tools\PluginRegistration Remove-Item .\Tools\$prtFolder -Force -Recurse



    And when you press enter, it’ll setup the same and this will be your completed state –

  6. And you are done! Plugin Registration Tool has been downloaded
    And since we only Downloaded the Plugin Registration Tool and nothing else, only Plugin Registration Tool folder will be seen

  7. And here’s your Plugin Registration Tool


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

  1. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  2. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  3. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  4. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  5. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  6. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  7. Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
  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!!

Follow up message in Teams using Power Automate for Teams app

Now that Power Automate is in GA in Teams, there are a ton of automations you can perform and quite a few of them already ready to be consumed right within the templates itself without you having to do anything at all.

One such important Flow is setting Follow up on messages! Let’s look at how we can find and use this

Power Automate in Teams

Power Automate is now in Teams as well. Here’s how you can get it –

  1. You can go the Apps in Teams. Then, look for Power Automate.

  2. Now, you’ll see this populate template called as Follow up on a message which is already created completely for you.


  3. Once you select this, you’ll just need to confirm. I’ll just call it Follow up on a message. Then, I’ll simply click on Create flow.

  4. Once you click on Create, you’ll see a confirmation message that the Flow has been created.

  5. You’ll see it turned on in your Home in Power Automate.

  6. Now, once this is setup, you’ll see a Bot on the Chat list in Teams.

  7. And it will show you that the Flow is ready to run.


Following up on a message in Teams

So here’s how it does –

  1. Let’s say I got a message from a colleague that he’ll get back to me in 5 mins.

  2. Now, in case I forget, it’ll be gone and I might remember this by myself much later. Here’s where I can add a follow up to this. So, I’ll click on the three dots (ellipses) and go to More Actions and then see the Flow I created.

  3. Now, it’ll ask me some details as to when I want to follow up and what should show up.
    So, I’ll enter the Date & Time of when I want to be reminded and what the reminder should say.

  4. And, at the given time, the Flow Bot will pop this message in it’s own chat window.
    I can go to the message.


  5. And it’ll simply take me to the message. On the phone app, it subtly glows for a brief moment (Perhaps this could some to Teams in a more prominent way)


Hope this helps!

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

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

Thank you!

Comments in Power Platform [Preview] | Power Automate example

Here’s a new feature across Power Platform stack i.e. Power Apps / Power Virtual Agents and Power Automate

Comments

Let’s consider an example of a Flow / Power Automate for the Comments

  1. In a Cloud Flow, now you’ll see a Comments (preview) show up.

  2. When you click on it, Comments pane will open up letting you add Comments to the Flow.

  3. And just like in Word, you’ll be able to enter comments for the Flow. These comments are added pertaining to the selected Flow Step or the first Flow Step by default.
    Click on the send button to add the comment.

  4. Now, once a comment is added, a counter/badge of count of comments will appear on the Step the comment is tied to.

  5. As you proceed, multiple users can add their comments to different steps. (Ideally, since I added 2 comments to the second step, both should be highlighted. This could be in preview and in the works). I’ll update this space again as I have more info

  6. Similarly, a thread looks like the one highlighted on the right and if you notice, the Flow Step too will lit up a little to denote which step the comment thread belongs to.
    Also, a comment thread is treated as count of 1.

  7. For each thread, you have the below options per thread/comment.

  8. And if you Resolve a comment/thread, notice that the counter from the Flow Step is discounted/removed and the comment thread is marked with Resolved tag on the top.

    Also, the step it belongs to is highlighted a little and is slightly difficult to identify right away
    Perhaps this behavior could be changed in the future once in GA.


  9. Once a thread is Resolved, it could be Reopened or Deleted as the icons suggest.

Hope this helps!

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

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

Thank you!

Block Connector access in Power Platform Admin Center | Power Apps & Power Automate

You can define policies in Power Platform Admin to restrict the use of certain connectors, both – prebuilt and custom connectors in the Power Platform.

Setting DLP Policy for Connectors – Blocking connectors

You’ll need to go to Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)


  1. In Power Platform Admin Center, you’ll need to expand the section called as Policies and you’ll find the option called as Data Policies

  2. In this, you can create Policies for the Connectors which are used in Power Automate / Power Apps

  3. Once you start to create your Policy, give it a suitable name –


  4. Next, I’ll get a list all uncategorized Connectors which I can either choose to select and start Blocking them or send them to Business category.


  5. Let’s say you want to set a policy to restrict certain Actions on the connector called as Power Automate Admins connector. I want to now move this connector to Blocked category.
    So, I find the connector, select and and click on Block as shown below.


  6. Now, I’ll see this connector in the Blocked section.


  7. For now, I’ll ignore the Custom Connectors because I don’t have any for now.

  8. And then, proceed further to define the Scope of this policy i.e. on Environment level.
    For this example, Add all environments is selected since I want to have this for all environments and not selective ones. Quite self-explanatory.

  9. Finally, I’ll Create this Policy.

  10. And you’ll see your Policy created like this –

Policy Usage

Now, let’s review how this policy will work.

  1. Now, in a Flow, I’ll select the Connector for which we’ve set the Policy for. The policy doesn’t hide anything, it let’s you select it first.


  2. And if you select any Action from the Flow, the Flow Checker indicator will light up indicating an error.

  3. And if you expand, it’ll state that the connector is not allowed to be used.
    This won’t allow you to save the flow, forcing you to revoke the step you have performed.



Blocking selective Actions in Connectors

Given you don’t want to Block the whole connector but want to only restrict selective Actions in a connector, here’s what you can do –

  1. While we are tweaking our existing policy, let me take a chance to also show you that you can edit the Policy from the List. Select it, and then click on Edit Policy.

  2. Now, let’s assume our Connector not blocked in the first place and exists in either of the categories i.e. Business or Non-Business.
    Find the connector. Then find the three dots and expand the menu to further show Configure connector (preview) and then select Connector actions

    Remember, this is in Preview and we’ll need to wait to use it for Production once in GA.
  3. Now, you can select what all Actions should be allowed and what all shouldn’t be in order to restrict any unwanted operations configured by other Admins.
    In this scenario, let’s just allow ‘Disable Flow as Admin‘ action and restrict all other ones.

  4. Now, the allowed one will not have any issues.


  5. And the ones we have not allowed, will show the error in the Flow Checker.


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

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

Thank you!

Create a Power Apps Per User Plan Trial | Dataverse environment

Here’s how you can create a Power Apps trial under the Per App Plan which is of $20!
Link: https://powerapps.microsoft.com/en-us/pricing/

Under Per App Pricing, look for Try New button where you can start the trial setup process.

Setting up a new tenant

Once you use the above link to, you’ll be taken to the Setup page like any other Dynamics trials you must’ve signed-up for –

  1. Fill in an email on which you would want to receive subscription communication email.
    Then, click Next.
  2. In the next step, if the email address doesn’t exist ()-

  3. Next, under Tell us about yourself section, enter the basic details.

  4. Once you fill in these details, click Next. You’ll be asked to enter phone on which you’ll receive the OTP to authenticate

  5. Enter code and proceed.
    In case you want to change the domain, you can do so before finalizing. Else, you can directly click on Next.


    And once this is finalized, you can click on Save and it’ll be locked.
    So in case you changed, then click on Next post that.

  6. In the final step, you’ll see the below. Once the info is correct, click on Get Started and you’ll be taken to M365 Admin Portal.

License

If you check the license which is assigned in this, you’ll see the –

Creating a Dataverse Environment

Now, you can create a Power Apps Dataverse environment –

  1. Go to https://admin.powerplatform.microsoft.com/ and you can click on New.

  2. Now, you can set the name of the environment.
    Note that the default type is set to Sandbox [I’ll tell you why this will cause an issue]


  3. In case you proceed to create a Sandbox type


  4. You’ll end up having this error which needs at least 1GB space.

  5. That’s why you can go back and change the Type to Trial (Subscription-based).
    Also, notice that the Database will be created.

  6. Then, you can proceed. Also, notice that I’m also deploying sample data. Hence, Power Apps based Apps will be setup with demo data and not the Dynamics 365 Apps.

  7. Then, provisioning will start.

  8. In a few moments, the environment will be created and you can navigate to it.

  9. Select the environment and click on Open Environment.

  10. And the environment with sample apps and data will open up!

Here are some more Power Apps related posts you might want to check out –

  1. HTML Text control in Canvas Power Apps | Power Platform
  2. Configure Dataverse Search in Power Platform Admin Center | Dynamics 365
  3. Form Access Checker in new Power Apps Form Designer | Model-Driven Apps in Dynamics 365
  4. Log Canvas Power App telemetry data in Azure Application Insights | Power Apps
  5. Variables in Canvas Power Apps | Global and Context
  6. Dynamics 365 Solutions’ New Experience in Power Apps, Solution Checker and more
  7. Navigate Screen automatically based on Timer in Canvas Power App | Power Platform
  8. Advanced Lookup in Model-Driven Apps | Power Platform
  9. New App Designer for Model-Driven Apps | Power Platform
  10. Primary Key of Activity type entity in a Dataverse connector in Power Automate | Quick Tip

Thank you!

Configure Dataverse Search in Power Platform Admin Center | Dynamics 365

Relevance Search in Dynamics 365 CRM recently got renamed to “Dataverse Seach” as you might have seen some updates.

Here’s how to configure the Dataverse Seach in the new Solutions Explorer!

Scenario

Now, in case you search on the Global Search bar for a record and the table which it lies in doesn’t show up – In this case table I’m looking in is ‘Subscription’ – that means that this entity is not configured for Dataverse Search

Dataverse Search

Here are some points on the Dataverse Search –

  1. Dataverse search is enabled directly is you are opted in to 2021 Wave 2 Updates on your environment.
    Go to https://admin.powerplatform.microsoft.com/ and open the desired environment’s Features section from Settings.


    You’ll find that Dataverse Search is already ON.



  2. Now, navigate to https://make.powerapps.com/ to configure the Dataverse Search for a specific entity.
    Go to Solutions and look for the Solution which has your entity
    In this example, I’ll use the custom entity I’ve created called as ‘Subscription’

  3. In any solution which has this entity, I can click on Overview on the left.


    And then if you look at the right hand side – click on Manage Index


  4. It’ll show the entity which is not enabled for Search – But, notice that it is unchecked – means it is not enabled.



    Now, enable and save it




Check if Table is enabled for Dataverse Search

  1. Enable the Table for Search Results. Now, when you are in the Solution in the new Solution Explorer – Look for the Table. In my example, it is Subscription table.
    I’ll open the Settings of the Table.


  2. In the Settings of the Subscription table, you’ll need to expand the Advanced options.


  3. Now, scroll below and you’ll see the option for Appear in Search Results is enabled.



  4. And once this is enabled, the results will show up in Dynamics 365

Indexed Columns

Now, here’s how to understand the count of Indexed columns. Limit of 950 columns is imposed in a Dynamics 365 environment.
Refer Microsoft’s Official Post – https://docs.microsoft.com/en-us/power-platform/admin/configure-relevance-search-organization#select-tables-for-dataverse-search?WT.mc_id=DX-MVP-5003911

  1. Here’s a snippet from the above mentioned Microsoft Docs to show the count of Indexed Columns calculated towards a Dataverse Search

Hope this helped!

Here are some more Canvas Power Apps posts you might want to check –

  1. Transition effect on Gallery Items when hovered over in a Canvas Power App | [Quick Tip]
  2. Navigate Screen automatically based on Timer in Canvas Power App | Power Platform
  3. Search on multiple columns from a Dataverse table in a Canvas Power App Gallery control | Power Platform
  4. Call a Flow from Canvas Power App and get back response | Power Platform
  5. Enable Custom Code Components (PCF Controls) to be imported in a Canvas Power App | Quick Tip
  6. Retrieve Hashtags from Text in a Canvas Power App | Power Platform
  7. Rich Text Control for Canvas and Model-Driven App | Quick Tip
  8. Setting Correct Default Mode for Forms in a Canvas App | [Quick Tip]
  9. Rating Control to represent data from Dataverse in a Canvas Power App | Power Platform
  10. Clear a field value & Reset Form in a Canvas Power App [Quick Tip]
  11. Get Dynamics 365 field metadata in a Canvas App using DataSourceInfo function | Common Data Service
  12. Implement character length validation in a Canvas Power App | Power Platform

Thank you!

Allow users to create App Passwords in Office 365 | Multi-factor Authentication

If you are an Admin User who wish to create App Passwords so that you can use them in your code/web applications so that you don’t have to store credentials in your application? Example: Azure Function you are developing shouldn’t store the password of the User.

At times, you must’ve noticed that why you can’t crea