Connecting to your Dataverse instance to run SQL Queries without using XrmToolBox

Hi Folks,

Do you know that you can connect to your Dataverse DB right from your old toolbox SSMS, an express version would be more than enough to try out. Possibly we didn’t think of, but yes, we can…so let’s see that in this blog post.

Open SSMS..

1.Select Server type as Database Engine

2. Server name as the environment URL from your Power Platform Admin Center as below.

3. So key in those details as below, make sure to Select Authentication method as Azure Active Directory – Universal with MFA option.

Once you click on Connect, you will be prompted for authentication via browser.

Once your Sign-In is successful, you will be able to see.

That’s it, how simple it was connecting to your Dataverse instances…

Having said that it’s easy to connect to Dataverse, not all operations performed using normal transact SQL are supported here using Dataverse SQL. You could see it says Read-Only besides the instance name, that means that you don’t have any capabilities to modify from SQL.

Because Dataverse SQL is a subset of Transact-SQL. If you want to see what statements are supported and what not, just go ahead to this link to find out.

This opens a whole lot of opportunities to explore, so don’t forget to check this out.

References:

Dataverse SQL and Transact SQL

Cheers,

PMDY

Cloning feature branch from Azure DevOps repository doesn’t get you the latest changes..?

Hi Folks,

This blog post is just an observation from my experiences of getting the latest version of code from a remote development feature branch cloned from the main branch. I didn’t observe this my first sight and because of couple of other issues, I had overseen this, spent over a half an hour and I had to giggle after knowing this.

If you were aware, as of my last update in September 2021, Azure DevOps and Visual Studio have been integrated to support seamless code collaboration and version control.

So usually in day-to-day activities of any Developer working Microsoft Technology stack, Pull, Push, Clone, Merge of Azure DevOps repository directly from Visual Studio is quite common.

Usually, to clone a repository from Azure DevOps, you follow the below steps.

Step 1: Open Visual Studio of any
version, preferably after VS 2017
Step 2: Click on Clone the repository.

Step 3: Enter the Azure DevOps
Repository URL and provide the path in the prompt.

Step 4: Select your respective
repository and click on Sign in

Step 5: Once you are done click on
Clone, all your source code is now available in your IDE (Visual Studio)

There might be cases when you check and see you were not able to get the latest changes from your feature branch, those were present in the repo but not in your Visual Studio. Closing the Visual Studio and redoing the Cloning process didn’t help. Then I thought it could be because of Cache of Visual Studio in my PC, so I tried clearing cache following my favorite blog post written earlier in this blog. Even this didn’t help either, thanks to my buddy Mallikarjun C who gave me the clue and here it goes.

Whenever you were cloning a solution using above approach, ideally you will be checked out to the Main branch and not the feature branch which you were expecting to be checked out to, as Main is set as Default branch.

If you just see below, it wasn’t checked out to Develop, instead it was main. By default, with this approach, you will by default checked out to main branch.

Hence you were seeing the changes of the main branch itself and not the Develop branch.

Instead of this, as I learned I suggest you clone directly to your favorite IDE from Azure DevOps itself in few clicks.

Step 1: While you are in your respective branch in Azure DevOps, click on Clone option as highlighted below.

Step 2: It will then ask you to choose the IDE to which you can download the source code.

Hope this helps someone figuring this out..

Cheers,

PMDY

What is Microsoft Cloud for Health Care…?

Hi Folks,

Have you heard about this before?

Microsoft Cloud for Healthcare provides capabilities to manage health data at scale and make it easier for healthcare organizations to improve the patient experience, coordinate care, and drive operational efficiency, while helping support security, compliance, and interoperability of health data.

Microsoft Cloud for Healthcare includes solutions that are built on capabilities within Microsoft Dynamics 365, Microsoft 365, Microsoft Azure, and Microsoft Power Platform.

This is an introduction blog post. Firstly, Microsoft Cloud for Healthcare solution should be installed from Microsoft Cloud Solution Center. To say about Microsoft Cloud Solution Center, it actually checks for requirements such as licenses, dependencies, and enables you to easily discover and deploy capabilities and solutions in Microsoft Cloud for Healthcare, there by simplifying the deployment process from a single location.

We will see what are the prerequisites.

Prerequisites

  • You must be a tenant admin, Dynamics 365 admin, or Power Platform admin to deploy Microsoft Cloud for Healthcare solutions.
  • You must have licenses for the Microsoft Cloud for Healthcare solutions and apps that you’re deploying. If your organization doesn’t have the necessary licenses, you’ll be notified during the deployment process in Solution Center.

Here are the solutions that are part of Microsoft Cloud for Healthcare, for each solution. We need to keep in mind that:

  • Some solutions have predeployment setup requirements.
  • Some solutions require configuration or have additional capabilities that you can set up after deployment.
SolutionDependencies
Patient accessPower Pages, Dynamics 365 Customer Service
Patient service centerDynamics 365 Customer Service, Digital Messaging add-on for Dynamics 365 Customer Service
Patient outreachDynamics 365 Marketing
Patient insight cardsDynamics 365 Sales Premium
Care managementDynamics 365 Customer Service*
Home healthDynamics 365 Field Service
Data integration toolkitPower Apps
Unified patient viewPower Apps
Patient trends (preview)Power Apps, Dynamics 365 Customer Insights
Patient population dashboard (preview)Power BI
Provider data modelPower Apps
Payor data model (preview)Power Apps
Life sciences data model (preview)Power Apps
Virtual VisitsMicrosoft Teams
Text analytics for healthAzure subscription
Azure IoT for healthcareAzure subscription
Azure Health BotAzure subscription
Azure Health Data ServicesAzure subscription
Healthcare database templatesAzure subscription
Health document intelligenceAzure subscription

There were a ton of Microsoft Azure capabilities to explore which I will do in my upcoming blog posts. So here, I am using a personal Azure subscription and rest everything I will try to keep using Trial accounts as long as possible. So, you don’t need to worry if you will charge just to try it out.

Also, with the advent of AI, health care industry is getting revolutionized.

Interested…? Then keep looking this space as I will explore more with all of you. Stay tuned…

Cheers,

PMDY

Show last refreshed time for your Power BI Reports in Import Mode – Quick Tip

Hi Folks,

If you are working on Power BI, this is a good to know tip.

In case you were using Import mode which is by default suggested by Microsoft for medium or small-scale datasets as it uses Vertipaq engine for improved performance and compression, this post is definitely for you.

Did your user ever asked why they were not able to see latest data in the report. Possibly you could have said it is because of refresh frequency.

Then you could have thought if there was a nice way to show when the dataset was last refreshed. This definitely help your users to have a clear idea of what’s going on.

FYI, the refresh frequency could be set in Power BI service as below for import mode.

In your Power BI report, click on Transform data.

Click on New Source –> Blank Query as below.

In the Query Fx expression…. enter the below expression to get the last refresh time and click on Tick symbol.

Next, click on To Table to create a table from this data as below.

Rename it to something meaningful like below.

Rename the Query1 variable as below..you should see the applied steps getting added for each operation you performed.

DateTime.LocalNow() gets the last refresh frequency of your dataset in your local time.

Click on Close & Apply

Now in your report, just add a card visual at the bottom right corner and drag the Last Refreshed On query.

That’s it, next time onwards, you should see the date and time when the refresh had occurred.

Cheers,

PMDY

Update your Model Driven App User personal settings in an easier way – Quick Tip

Hi Folks,

Did u ever been asked in your project to update the User Personal Settings….possibly you could have resorted to User Settings Utility in XrmToolBox…may be you could have updated the settings manually for each user in list provided to you…

Do you know you could update them in bulk at one shot in a much easier way, so you don’t need to update it manually one by one. I could see many blog posts talking about updating through this tool, but this was missed in those.

Scenario:

You have newly added users to your Azure Active Directory, now you need to set up the user personal settings for them so see proper time zone in Dynamics.

There were two ways:

  1. Use a view
  2. Choose users from FXB(Fetch XML Builder)

The first approach is easiest of course…

For this, lets create a view Users with Security in user entity as below…you know that you could only update settings for those who were having security role.

Mainly the user need prvReadUserSettings privilege to update the personal settings, the tool doesn’t allow if not.

Once you have connected to the environment, click on Load Users and settings. Now just select the view which have created before…upon selecting the tool will list down all the active users satisfying the view criteria.

All you need is to click on Check all and there by selecting all the users satisfying your filter criteria, change the settings as per your needs on the right-hand side of the tool and click on Update User(s) Settings in one go.

Here I have 3 users in the view, all were updated in one shot…

Isn’t it easy, this trick will save you a lot of time if your user list grows…

Cheers,

PMDY

Deploying Solutions using Power Platform CLI

In my previous blog post, I have already explained how you can utilize Power Pipelines which is the OOB Dynamics 365 Product capability.

Power Platform have many ways where we can deploy our solutions to higher environments…in this blog post, we will see how we can utilize Power Platform CLI to deploy our solutions.

Prerequisites: Power Platform CLI

If you don’t have installed yet in your machine, you can download Power Platform CLI from this link in either of the ways below

1.Install using Power Platform Tools for Visual Studio Code

2. Install Power Platform CLI for Windows using PowerShell

Once you got this installed, make sure you set your environment variable in your machine as below

Then you can use your favorite IDE or Command line. I personally recommend using Visual Studio Code because of the flexibility it offers and ease of installation, use.

Export and Import can be done very easily with CLI with a few commands once you were authenticated with your instance.

For authentication with your instance. Open a new terminal in visual studio code.

pac auth create –name powermvps1 –url <give your org URL here> –username <give your username here> –password <give your password here>

As below..

Once you have set up correctly, it will show that it is connected.

Now in order to export your solution..use the below commands from Vs Code

pac solution export –path <Path of the Solution Zip file> –name <Solution Name> –managed false –include general

As below..

You should see a Solution zip file got created with the same name as mentioned above…

Similarly, u can import solutions using CLI..

Here I have a solution named ecellorstest in the same folder in my machine..

Let’s try to import using CLI..inorder to import your solution,use the below commands from Vs Code…

pac solution import –path <Solution Zip file path> –activate-plugins true –publish-changes true –async true

As below..

If we check in our instance, we see the solution is imported…

That’s it, how easy it was…however I have detailed about only a part of full capabilities of Power Platform CLI, its uses are unimaginable.

Reference: Power Platform CLI for Solutions

Cheers,

PMDY

Cannot connect to SQL Server from SSMS – Quick Tip

Hi Folks,

I will keep this blog post short…the few days back I have installed local SQL Server from this link in my laptop, I was able to connect to it then.

But later in less than a week, I was unable to connect to the same SQL Server from SSMS and gives me the below error.

To check this, firstly you need to see if such SQL Server is uninstalled and then check if it was running.

In my case, as I could already see the name of the Server in the SSMS, the next step is to check whether it is in running state. So, for this all you need to do was, just open the SQL Server Configuration Manager in your machine whenever you want to configure the network protocols which gets installed by default whenever you try to install the SQL Server and it actually shows up all the SQL Related Configurations.

Just locate the SQL Server you were trying to connect and restart the same by right clicking on it…

Then try connecting to SQL Server, you should be able to connect to it…

That’s it…in the upcoming blog posts, we will see how we can work with On-premises Data Gateway to work with Dataflows in order to push the data to cloud and how you can show the data in Power BI.

Cheers,

PMDY

Avoiding Parallelism in Dynamics 365 Plugins/Custom Workflows: Unraveling the Pitfalls and Maximizing Efficiency

Subscribe to continue reading

Subscribe to get access to the rest of this post and other subscriber-only content.

Create a Custom Connector for your Web API from within Visual Studio

Hi Folks,

In this blog post, let’s see how we can create a custom connector without leaving our own Visual Studio for building a custom connector. Ideally for building any custom connector, we need to create them in https://make.powerapps.com or https://make.powerautomate.com. Last month Microsoft Announced that Power Platform is now a connected service in Visual Studio 2022. In this blog, we will utilize its capability…

Before diving deeper, let’s see what are the prerequisites..

  1. Visual Studio
  2. ASP .NET Web API knowledge
  3. Canvas Apps knowledge

Let’s get started..

Step 1:

Create ASP.NET Web API Project in Visual Studio

Step 2:Choose your option as below and click on Next..

Step 3:

Choose your next steps as below and click on Next to proceed, make sure to choose authentication type as None

Step 4:

Create a ASP.NET Core Web API Project

Step 5:

By adding Power Platform as a service dependency, you can update an existing custom connector, or create a new one from your API.

If you want to expose your local running API to a public endpoint, I prefer using Dev Tunnels feature of Visual Studio…

That’s it, you have started running your API.

Step 6:

Now let’s create a Mobile App with Power Apps…with the same login you have used for the Visual Studio to create a custom connector..

Step 7:

First check if Custom Connector has been created in your tenant and authenticate the connection….navigate to https://make.powerapps.com and click on Discover at the left of the page….and then click on Custom Connectors, you should see a connector which we created from Visual Studio….nice isn’t it…

Step 8:

All you need to create a connection by clicking on the + sign available..

Once connected, now try creating a mobile Canvas App..

In the Canvas App, try adding data…and search for Weather Sample which you created, you should see something like below…

Step 9:

Once the web API is running in your development environment, you can debug in real time and even Hot Reload your code.

References:

https://learn.microsoft.com/en-us/aspnet/core/test/dev-tunnels?view=aspnetcore-7.0#create-a-tunnel

Thank you for reading…

Cheers,

PMDY

Dataverse Low Code Plugins – Insight

Prerequisite: Intall Dataverse Accelerator from AppSource from Microsoft Power CAT Team. Follow along once you have installed…see Dataverse Accelerator Installation Post if you want to know how..

Firstly, open the environment from https://make.powerapps.com where you would like to test this out, install the Dataverse Accelerator Solution as described above.

You should see there is an option to create Plugin from UI itself, no need to open Visual Studio and write your .Net Class library and register using Plugin Registration tool.

Please note that this is still an Experimental Feature and lot of improvements yet to be made..below is my quick test on basic CRUD Operation using this Plugin..

There were two types of Low Code Plugins

  1. Instant Plugins
  2. Automated Plugins

Let’s see how they work by creating an Instant Plugin

Step 1: Click on New Plugin Button available

Step 2: Key in the display name and description, both are mandatory to be entered…we don’t have a way to customize here as of now…

Step 3:Then Click on Next and enter the Parameters in the Definition area…I just mentioned In and Out parameters for brevity, then added a simple expression to multiply the input variable supplied by 100…

Make sure you won’t get any errors

Step 4: Then click on Next and click on Save.

Step 5:Once Saved, you will get a new button for testing…

Step 6:Clicking on Test will get you to the below screen to enter your input parameter…

Step 7:Clicking on Run which gives the output in Web API and highlighted is the response received with a success.

Note:

For some of the Automated Plugins, got a failure message with no way to troubleshoot what was the error was…I have raised this to Microsoft, but they mentioned that these features are work in Progress…

Hope we get all the complex functionality there in Dynamics 365 CE Plugins be available within Dataverse Low Code Plugins with the help of Power Fx too in future….the App development is going to be lot more easier…with Microsoft Power Platform… and citizen developers can pitch in…

Reference: Dataverse Low Code Plugins Repo in GIT Hub

Thank you for reading…

Cheers,

PMDY