Sam's Microsoft Dynamics 365 Blog

Saturday, 23 March 2019

Creating a first App with Microsoft PowerApps


In this article, step by step I will explain you how to create an App using Microsoft PowerApps.

First we have to setup a PowerApps account. We can setup an account using https://powerapps.microsoft.com. We have to setup an account using Organization email address.

Creating an App:-

After creating an account we can see the home dashboard.

     


So let's start creation of App. Now we can see a list of navigation on left side.

First Click on Apps. After that a new page will open, here is an option of Create an app, So click on that. Now here we can see two options Canvas and Model drive. So in this article we are going to create a Canvas app. Now Select Canvas.

Now in next step we are going to select Dynamics 365 Phone Layout.



 After that it will ask for a connection, So select New Connection.



 Now it will show a list of different different types of Connections and we will selecct Dynamics 365 and then click on Create.



Now Select a DataSet.



After that Choose an Entity(Table) and click on Connect.



Now we can see a PowerApps development Studio.

It has created three screens automatically. The screens are : 1. List View, 2. Detail View and 3. Edit View.

We can see on left navigation, here it is showing screens.

1. List View:-  It will contain a list of records.



2. Detail View:-  It will contain a detailed section of a record.



3. Edit View:-  It will contain an edit view of a record.




Saving App:-

Don’t forgot to save an App. So click on File in top menu. After that there a new page will apear and there will be two options : 1. The Cloud and 2. The Computer.
Now select the Cloud option and put an app Name and Save it.




Run App:-

An App is created and also saved, Now we need to Run it, So now click a Play icon on right side in top navigation bar. Also we can run it using F5 keyboard key.



Modify Fields on View:-

Obviously, we need to add or remove some fields on Forms, So we are going to add a field on Detail View.

We will add an Entity Image field on form for displaying the image of Contact.

So Now click on Detail Form as shown in Screenshot. After that click on Properties on right side and then click on edit field. A popup will display. Now click on Add field and then select a field as we are going to select Entity Image and then click on Add.




 Now Run the app and we can see the Image at bottom of a related contact.




Update the Theme of an App:-

Now let's discuss that how can we apply a theme to an App. PowerApps provide some themes. So let we are going to change the theme of App.
First click on Home inside top navigation and then click on Theme. A popup window will display a list of themes. We will select a Dark theme. Now changes will apply and it will looks like as shown in below screenshot.



Thanks for reading the article. I hope it will help you. Cheers….!!!!

Wednesday, 27 February 2019

Migrate data Between CRM Instances Using Configuration Migration Tool

In this blog, we will learn about migrating configuration data between environments(instances). 


The Configuration Migration Tool works as follows: -



  •  Create Schema:-  Create  the schema file of source data.
  •  Export data :- Export data from source instance.
  •  Import data:- Import the exported data.



We can get Configuration Migration Tool from SDK.




We can find this tool inside sdk\ConfigMigration directory with name DataMigrationUtility.exe.


A. Create Schema :-

1.  Open the Configuration Migration Tool, below form appears allowing the user to select the desired action. For this example, we have specified “Create Schema” and selected Continue.



2. Enter login credentials.


3. After logging in, the user is prompted to select a Solution and Entity.



4. Select the fields to be added to entity or select Add Entity to add all fields in the selected entity. We chose account entity. Items selected appear on the right and can be expanded as shown here.

5. Next, Select Save and Export.



B. Export Data :-

6. After saving the file, it will ask for exporting the data.
7. Select Yes.


8. After specifying the data file name and location select Export Data.



9. The progress of the file generation process will look like as shown in below screenshot.




C.  Import Data :-


10.  After completion of Export, we can import these data to any another environments(Instances).

11.  For importing data to another instance we have to select Import data option and then continue.




12. Enter login credentials.
13.  After logging in, we have to select an Exported data zip file(from stored location).
14.  Then Click on Continue.



15.  After Selecting the data file select Import Data.
 16. The progress of the file generation will look like as shown in below screenshot.










Tuesday, 23 October 2018

Display SharePoint Documents on Form in MS Dynamics CRM


Here’s an easy way to embed the SharePoint document window you’d normally get by navigating to “Documents” under related records, which includes all the native functionality like search, upload, 
This might fall under the area of semi/not supported but if it happens to break one day you won’t have invested too much.

You’ll need to create an iFrame for the SharePoint content, probably within it’s own tab. Remember what you name the iFrame as you’ll need to modify with that value. 

When configuring the iFrame...

On the General tab:

  • Restrict cross-frame scripting… to Unchecked
On the Formatting tab:
  • Number of Rows to 34
  • Scrolling to Never
  • Display Border to Unchecked
You could set the rows to a lower number, you’d just end up with a scrollbar despite the never scroll setting. 

Take this code and update the iFrame name and add it to the form. Call SetDocumentFrame during the form’s OnLoad event.







function SetDocumentiFrame() {

    try {
        // Get Subgrid URL
        var url = Xrm.Page.context.getClientUrl() +
            "/userdefined/areas.aspx?formid=ab44efca-df12-432e-a74a-83de61c3f3e9&inlineEdit=1&navItemName=Documents&oId=%7b" +
            Xrm.Page.data.entity.getId().replace("{", "").replace("}", "") + "%7d&oType=" +
            Xrm.Page.context.getQueryStringParameters().etc +
            "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White";

        ///Append subgrid in Iframe
        Xrm.Page.getControl("IFRAME_SharePointDocuments").setSrc(url);
    }
    catch (err) {

    }


}


If you’re doing this, you might also consider turning on the option to auto-create SharePoint folders. Otherwise people are going to be getting prompted. You can find this under:

Settings => Document Management => Document Management Settings and then it’s on the 2nd page. 





With any luck, you’ll end up with something like this:








How to Get the Power Automate Flow Run URL Using Expressions

In many Power Automate projects, especially those involving approvals, error handling, or audit logs, it’s helpful to have a direct link to ...