Updating Entity Reference Power Automate vs Plugin- Owner

In my last blog, I was getting OwnerType as blank. With help of Microsoft community, I understood that we won’t get the OwnerType from the triggering event output. Ideally it should have directly provided, but since it is not provided, let us use the other way around.

Our requirement is to check the Owner type of the Case record and set the same for the task

After the triggering event, I am using “Get a record” step in my flow and the OwnerType value from this step’s output as shown in below snippet

Again here is a tricky thing to remember. If I directly get the OwnerType field from its output in my next step’s expression, again it would be blank. (Not sure why it can’t be used from output in the expression of next step- I may get the reason and some way around and post it)

Hence after getting the record, I need to get that value in a variable as shown in below snippet

Once I have this value in a variable, I can then use it in any expression in next step


I thought multiple times if I should use the if else condition which comes in steps Condition, however when I just need to replace the string based on the if condition and rest of the actions are exactly same, then I won’t recommend to use Condition and use branching with same steps. Instead we can use If condition in the expression

Once I use this condition, automatically, it would pick up the OwnerType based on the Case Owner and accordingly assign the same Owner to the Task, be it Team or User, does not matter. For examples, below the owner is Team , hence its setting as Team.

Now another example is a Case where Owner is User.

Task is getting created with same Owner

Lets also check the flow how its executed

In the post we have seen how we can get the Owner from one record and update the same in another record. Let us continue our Power Automate learning in my further posts

Till that time, happy power automating πŸ™‚ Enjoy new learning!

Power BI and D365 CE Connectivity – part 2

In last post, we have seen how to generate the fetchxml which can be used in Power BI for fetching the data from Dynamics 365 CE views. However the basic question of how to connect is still not discussed :). Let us do that connection in this post.

Let us again go to XRM tool box and open Power Query(M) Builder and click on “Generate Service Url”. As the plugin is already connected with the target CRM, it will generate the service urls which can be used in Power BI for connectivity.

Generate Service URl
Generate Service URLs

We can see the two tabs under Service URLs

Dyn365CEBaseURL: is the actual URL which we use in browser to open the CRM

Generate Service URl1

ServiceRoot URL: is API URL as shown inΒ  below snippet.

Generate Service URl2

Once we have these URLs, let us create the blank queries in Power BI desktop. Click on Getdata and click on Blank query.

Blank Query
Creating Blank Queries

Go to Advanced Editor

advanced Query editor
Advanced Editor

Copy the Dyn365CEBaseURL generated above and paste in advanced editor

advanced Query editor1
Paste Dyn365CEBaseURL

advanced Query editor2
Added Dyn365CEBaseURL

Rename the Query as Dyn365CEBaseURL

advanced Query editor3
Rename the Query as Dyn365CEBaseURL

Similarly create one more blank query and name it as ServiceRootURL and paste the ServicerootURL created in above steps in advanced editor.

advanced Query editor4

We have both the queries ready for the data connectivity. Now let us create few more queries for fetching actual data.

Create one more blank query and paste the fetchxml generated in earlier post in the advanced editor. I have named the query as Opportunity View.

opportunity view editor
Opportunity View

On Similar lines we can go ahead and add additional queries for different data , for ex Account data , I have added Account view.

Once we add these views, Power BI desktop might askΒ  to re authenticate and ask to enter the credentials. Once we connect and create these basic queries, we can go ahead and create various reports as usual in Power BI.

Refer my earlier posts to know more about data modelling, creating reports and dashboards

Continue reading “Power BI and D365 CE Connectivity – part 2”