How to – Get the size of tables in Dataverse / Dynamics 365

Nishant Rana's Weblog

Using the Capacity page in the Power Platform Admin Center we can extract the details of size occupied by table (in MB) within a particular environment.

Login to the admin portal and navigate to Capacity

https://admin.powerplatform.microsoft.com/resources/capacity

Select the Dataverse tab and click on Details or in case of trial click on the Trial tab

Here we have selected the details (graph) option for one of the environments.

Select Download all tables option for the Top database capacity use, by table chart


We can see the details within the extracted CSV file.

Get all the details here

https://docs.microsoft.com/en-us/power-platform/admin/capacity-storage#environment-storage-capacity-details

Hope it helps..

View original post

How to create a unified profile (Golden Customer Record) using Dynamics 365 Customer Insights – Part 1

Virendra Agrawal's Blog

I recently had an opportunity to work on Dynamics 365 Customer Insights for a retail client who was envisioning to consolidate their customer’s information to achieve a true customer 360-degree view.

The main objective was to remove the silos of data that represents customer purchases, payments, website visits, marketing & social interactions and customer service requests.

With it’s pre-built AI model, Customer Insights was able to help with ingesting massive amounts of data from separate systems and leverage matching strategies to build a unique profile and showcase customer’s total lifetime value, churn risk, and more.

In this series of posts, I would like to put some light on how we can use Dynamics 365 CI to ingest this customer data from multiple sources and set the matching rules to create a unified customer profile or a golden customer record.

We’ll see how we can connect Customer Insights with various data…

View original post 918 more words

Date Time Behavior and Format in Power Platform/Dynamics 365 CRM

Date Time field in power apps has behaviors and formats which control how the data will be stored in CDS (Common Data Service) and how it will pe presented to different users from different time zone on retrieval. Here I will try to explain the same in a simple way with examples for each combination of behaviors and formats.

Behavior: User Local

  1. Format: Date Only
    • User’s provided date gets converted to UTC before it gets saved in CDS.
    • As there is no time part in user input system will take midnight as input time for conversion.
    • Stored data in CDS will have both date and time part.
    • System will convert UTC time to requesting user’s time zone while displaying data in UI.
  2. Format: Date and Time
    • User’s provided date and time gets converted to UTC before it gets saved in CDS.
    • Stored data in CDS will have both date and time part.
    • System will convert UTC time to requesting user’s time zone while displaying data in UI.

Behavior: Date Only

  1. Format: Date Only
    • User’s provided date gets saved in CDS as it is.
    • Same date value gets displayed to all users irrespective of their time zone settings.

Behavior: Time-Zone Independent

  1. Format: Date Only
    • User’s provided date gets saved in CDS as it is, and system append midnight in the time part.
    • Same date value gets displayed to all users irrespective of their time zone settings.
    • Stored data in CDS will have both date and time part (time part will always be 00:00:00).
  2. Format: Date and Time
    • User’s provided date and time gets saved in CDS as it is.
    • Stored data in CDS will have both date and time part.

Example:

I took this example to illustrate how values are stored in CDS and how it gets converted to different time zone based on user’s time zone settings.

  • For easy understanding I used all times in 24hr format.
  • This example shows what is the impact of user’s time zone on insert/ update/retrieval of date values,
Field Behavior

Field Format

Example

Insert by User 1 (Time zone – GMT + 4:00).

Value seen by User 1 on UI (Time zone -> GMT + 4:00).

Value seen by User 2 on UI (Time zone -> GMT – 10:00).

Value seen by User 3 on UI (Time zone -> GMT + 13:00).

Value entered in UI

Value stored in DB (UTC)

User Local Date Only

6-Sep-20

9/5/2020 20:00

06-Sep-20

05-Sep-20

06-Sep-20

Date and Time

05-Sep-2020 06:00:00

05-Sep-2020 02:00:00

05-Sep-2020 06:00:00

04-Sep-2020 16:00:00

05-Sep-2020 15:00:00

Date Only Date Only

4-Sep-20

04-Sep-2020.

04-Sep-20

04-Sep-20

04-Sep-20

Time-Zone Independent Date Only

3-Sep-20

03-Sep-2020 00:00:00

03-Sep-20

03-Sep-20

03-Sep-20

Date and Time

02-Sep-2020 10:30:00

02-Sep-2020 10:30:00

02-Sep-2020 10:30:00

02-Sep-2020 10:30:00

02-Sep-2020 10:30:00

Here is some important point to note

  • Once a date time field behavior is set to either “Date Only” or “Time-Zone Independent” it cannot be changed.

  • Date time field with behavior “User Local” can be changed to “Date Only” or “Time-Zone Independent”. You must evaluate the impact before you make this change. Also, you must review all process like BPF/Workflow/Power Automate etc. and re-activate it to reflect field behavior changes in the process.

  • If you change date time field behavior “User Local” to “Date Only” or “Time-Zone Independent”, it will only affect new data modifications any existing data stored in this field will not get affected.
  • Within a behavior one can switch the format at any time. You can change format from “Date Only” to “Date and Time” and vice versa.

  • “Behavior: Date Only, Format: Date Only” and “Behavior: Time-Zone Independent, Format: Date Only” behave similarly except one thing that later have time part (always 00:00:00) when it is saved in CDS.

Thanks for reading, hope you find it helpful.

Cheers

SLA Changes in Dynamics 365/Power Apps

Microsoft has made some changes in SLA design; here I am going to share about the differences

  1. SLA Type option standard has been removed, earlier user has option to choose (as shown in below image)

  2. Earlier there were 2 entities now there are 3 entities to configure a new SLA
    1. Earlier
      1. SLA
      2. SLA Item
    2. Now
      1. SLA
      2. SLA Item
      3. SLAKPI
  3. Earlier only one SLA can be applied now you can use multiple SLAs. This is a much-needed feature, in our recent implementation we need to have 5 SLAs on Work Order entity and to chieve that we need to implement a child entity on work order and create 5 records in that to track 5 different SLAs.

  4. To manage SLA settings, you can navigate to “Customer Service Hub” application and then navigate to “Service Configuration Setting”, there you can find below settings
    1. You can disable SLA on an entity which is enable for SLA, it was not available earlier (while creating or modifying an entity if you select “Enable for SLA” option it cannot be changed later). NOTE: you still must use classic UI if you want to enable SLA for an entity, this option is not yet available in Unified interface.
    2. Now system can override a manual SLA selection

  5. Now you must define Success, Non-Complaint, and Nearing Mon-Compliant action in power Automate. Once you click on Configure Action in SLA item, it will open the Flow record created for this SLA Item. You will also notice that it has few steps already added and you must not delete it.

  6. SLA KPI was appearing as a drop down on SLA Item but now it has become an entity of its own.
    1. Earlier

    2. Now

  7. SLA KPI is a now solution aware component, it can be added in a Solution

Use column comparison in D365 CE/Power Apps/CDS queries

Microsoft has finally given option to compare two columns while querying data from D365 CE/Power Apps/CDS. Here I am sharing my experiences and examples of how it can be used from various channels

  1. Power Apps UI
  2. Web API
  3. Fetch XML
  4. SDK API (.net)

Power Apps UI: This feature is not yet available in PowerApps UI (Advance Find), hope It will be available soon

Web API: This is a sample example of how you can compare columns of various data types in web API

  1. String field to String field: here is the sample where I compared “firstname” column with “lastname” and “mobilephone” with “telephone1″ and it worked like a charm <a rel=”noreferrer noopener” href=”https://<https://<<YourOrganization>>/api/data/v9.1/contacts?$filter=firstname eq lastname and mobilephone eq telephone1&$select=firstname,lastname
  2. Other data types: I tried other data type field comparisons as mentioned below
    • DateTime – ex. createdon – modifiedon
    • Whole Number (Integer)
    • Option Set (Picklist)
    • Two Options (Boolean)
    • Floating Point Number (Double)

But Web API is giving error message “The right side of the \”Equal\” operator must be a constant value”, seems like Microsoft has not yet enabled this feature fully in Web API yet.

Fetch XML: This is a sample example of how you can compare columns of various data types in Fetch XML. I tried to create one query which covers following comparison scenario and it worked smoothly

  1. Text to text comparison
  2. 1 column ‘telephone1’ being compared with 2 columns ‘mobilephone’, and ‘fax’.
  3. Float to Float comparison
  4. DateTime to DateTime comparison
  5. Optionset to optionset comparison
  6. Optionset to whole number comparison
  7. Lookup to Lookup comparison
  8. Field comparison in a link entity

Query:

Response:

CRM Contact Entity which was returned in above response:

For more details on fetch XML you can refer Nishant’s Blog.

SDK API: Microsoft has shared a new API for this, you can use this to compare two column in query

public ConditionExpression
(
  string attributeName,
  ConditionOperator conditionOperator,
  bool compareColumns,
  object value
)

Example Query Expression:

var query = new QueryExpression("contact");

query.ColumnSet.AddColumns("firstname", "lastname");

query.Criteria.Conditions.Add(new ConditionExpression("firstname", ConditionOperator.Equal, true, "lastname"));

var results = client.RetrieveMultiple(query);

For details explanation on how to compare columns in query expression, I suggest you refer Debajit’s Blog.

Here is some observation I had while testing this feature and limitation of this feature:

  1. You can only compare columns within a single entity. IE you cannot compare column from contact entity to column in its parent account entity.
  2. As per Microsoft documentation only 2 columns can be compared at a time but it did not says how many condition can be added. I tried with 12 column comparisons (9 conditions) and it worked so I guess there is no limitation on number of conditions.
  3. Multi-value condition operators are not supported (i.e., “in”).
  4. Extended condition operators are not supported (i.e., “creditlimit > spends+1000”).
  5. Only column of compatible data type can be compared, like
    • Whole Number to Whole Number
    • Text to Text
    • Whole Number to option set
  6. If you try to compare two incompatible data type columns you will get below error (below is the error while comparing Text to Whole Number).
    • SDK Error Message: “Attributes of types “System.String”, ” System.Int32″ are not supported for comparison”
    • Web API Error Message: “A binary operator with incompatible types was detected. Found operand types ‘Edm.String’ and ‘Edm.Int32’ for operator kind ‘Equal’.”
  7. You can user column comparison in nested queries.
  8. In Web API field comparison is only working for string data type only.
  9. While comparing option set, option set numeric values are being compared not the Label (which is how it should be).

The new Column comparison in queries in Dynamics 365 / PowerApps

A nice addition to fetch XML query

Nishant Rana's Weblog

Column Comparison is one of the best features that has been recently added to the product.

Column comparison allows us to compare values of 2 different columns in our query be it Fetch XML, Web API, or through SDK API.

Sharing some of the basic examples that we tried using our favorite  FetchXML Builder

  • If we run the following query “Find all contact which has the first name equal to the last name”

The result –

  • Find all contact where the first name is not equal to last name

The result –

The operators supported are –

Equal LessEqual GreaterEqual
Not Equal LessThan GreaterThan
  • Only 2 columns can be compared.
  • Only compatible attribute types can be compared.
  • E.g. “Find all contact where the first name is equal to address 1 city”

The result

It works as both are string attributes.

  • If we try comparing text field with options set, we…

View original post 111 more words

Getting started with Git Repository in Visual Studio 2019

Using Git as a repository/source control with Visual Studio 2019

Nishant Rana's Weblog

Let us go through the steps to set up a Git Repository in Visual Studio 2019.

Open Visual Studio 2019

Go to Tools à Option and Set Git as source control plugin (if not set)

To create a new Repository, select Home àProjects and New Repository.

Provide the path and click on Create.

Click on the repository created to open it in the Team Explorer.

Click on Changes, which shows the files added as part of the creation of the Git Repository.

Click on Commit Staged to add the files to the local repository.

To sync it to the remote repository, we can click on Sync.

Now to add the solution to the Git Repository, back in the Home page of team explorer, click on New for the Solutions.

Follow through the Wizard. Here we have added a new solution of type Console Application to it.

Again, go…

View original post 196 more words

[Preview] New model-driven form designer is now available

MS has recently released the preview version of new form designer. It looks great and I hope there will be more features added to it in released version. Here are some points of this new designer

  1. This is based on WYSIWYG experience. After Publish, the form will appear exactly same to the users as it is appearing to you while designing.
  2. Now you can cut and paste control from one section or tab to other section or tab.
  3. Attribute properties are available in the right pane, no need to click open popup windows.

  4. You can check how your form looks on various devices

  5. Tree view: now you can see various form component and their relationship in a tree view

  6. This is small feature, but I liked it, you can zoom-in and zoom-out form designer.

  7. Undo/Redo: Another small useful feature.