Showing posts with label CDS. Show all posts
Showing posts with label CDS. Show all posts

Friday, 19 June 2020

Power Platform Analytics - Common Data Service, Power Automate and Power Apps

Hi Everyone,

Today I was going through Power Platform Admin Center and checked Analytics from the navigation. I remembered the days where we used to install Organization insights managed solution and check active/inactive users, storage usage, plugins success rate etc.

Now, we don't need any solution to install and there are lot more useful information to understand the system health from these analytics.

There are three analytics available, check Microsoft Docs (links below) to understand more on the roles that are needed to view the analytics and the information that would be provided.

1) Common Data Service  - Microsoft Docs Link

2) Power Automate  - Microsoft Docs Link

3) Power Apps  - Microsoft Docs Link

Hope this helps.

--
Happy 365'ing
Gopinath

Thursday, 11 June 2020

Create Record in Dynamics 365 CE Using Power Apps and Power Automate (Flow)


Hi Everyone,

This is my first post on Power Apps (Canvas App) and could be very basic to most of the people but it would helpful for the beginners like me.

  • Login to Make.PowerApps.Com
  • We can directly create an App and Flows from the navigation as below but I would recommend to create a Solution first and then create App and Flow in that.
  • Create a solution with the name as you wish and select the right publisher.
  • Open the solution and click on New from Top Navigation  --> App  --> Canvas App  --> Phone form factor(I have selected for it Phone UI for this post, you can select as per your requirement)
  • Save the App first with desired name. You can use Ctrl+S as a shortcut.
  • You will get the new tab in the browser as below.
  • From Insert Menu add required text boxes, labels and a button on the Screen. Make sure you use good naming convention as a best practice.
  • Go back to the solution again and create a flow as below.
  • Take trigger as PowerApps.
  • Declare two variables and set them to get the value from Power App. We have "Ask In Power Apps" in the value for getting the parameters.
  • Add a step to create a contact in Dynamics 365 CE using Common Data Service Connector and set the values. We cannot use Common Data Service Current Environment Connector as there is an OOB issue with that. Check this for more information on that.
  • Add "Respond to PowerApp or flow" and select response which you would like to send. Here I have selected Text and gave the response as below.
  • Let's go back to our canvas app and click on Action on top  --> Power Automate.
  • It will show the Flows that you have in the Organization and select the flow the one which you have created.
  • Call below OnSelect of the Create Contact button.

Set(flowResponse, NewContactCreatingFromFlow.Run(TextFirstname.Text, TextLastname.Text)); Notify(flowResponse.message,NotificationType.Success, 3000);

The code is simple, we are calling the flow with the parameters and storing the response in a variable called flowResponse. After the execution of flow is completed, we are notifying the user with the response that we got from Flow and for this we are using Notify command.

And Let's run it..


Hope this helps.

--
Happy 365'ing
Gopinath

Friday, 22 May 2020

Query CDS/Dynamics 365 data using SQL Query

Hi Everyone,

You know A SQL data connection is available on the Common Data Service endpoint. Although I am a big fan of FetchXML which makes our lives easier as we don't need to worry about backend things and our powerful Advance Find always helps us to frame Fetch XML in a right way. Sometimes(Debates with Salesforce Team as they always mention that they have SQL Workbench) even I felt that there should be some way in Dynamics as well and finally here it is.

Use SQL to query data (Preview)

This is one of most awaiting feature from many years and is in preview now. 

Points to be considered before you start using it.

1) Download and install 18.4 or latest version of SQL Server Management Studio
2) Only Azure Active Directory Authentication is supported. No SQL and Windows authentication is supported )It completely makes sense as well)
3) Below are the supported operations.

  • Batch operations
  • SELECT
  • Aggregation functions (i.e., Count() and Max() functions)
  • UNIONs and JOINs
  • Filtering

4) No updates/Inserts are allowed as this is a read-only connection.

The following Common Data Service datatypes are not supported with the SQL connection:

binary, image, ntext, sql_variant, varbinary, virtual, HierarchyId, managedproperty, file, xml, partylist, timestamp.

How to connect?
  1. Open SSMS
  2. Give Server name as the organization address URL followed by a comma and the port value of 5558.
  3. Authentication - Azure Active Directory-Password
  4. Give Username and Password

If you receive below error, please follow the steps mentioned here.
And we are good to run SQL queries on CDS.



Hope this helps.

--
Happy 365'ing
Gopinath

Thursday, 28 November 2019

Common Data Service (Current Environment) is not visible

Hi Everyone,

Today, I have started exploring Power Automate and while working on that I observed that sometimes Common Data Service (Current Environment) is not visible.

After some search, understood that Common Data Service(Current Environment) is visible from Flows inside Solutions.

You just have to create a Solution and use an existing then start working on Flow, you will see the Common Data Service (Current Environment) Connector.


Hope this helps.

--
Happy 365'ing
Gopinath