Dynamics 365 – Teams. Love at first SITE (pun intended)..

The Team

Hi everyone, meet Knut and Kjetil.

Knut is a salesperson at Point Taken. He just came across a HUGE deal that he has registered in Dynamics 365. This deal is so big that Knut will need the assistance of several resources to deliver. One of these resources is Kjetil, a SharePoint consultant.

The setup

Knut enters the details needed for the Dynamics 365 deal

Knowing that this opportunity is HUGE, Knut starts by creating a new channel in the Offers Team (name is “General” for demo purposes).

The connection

Knut has now setup the structure for collaboration, and is ready to connect Teams and Dynamics 365 together.
Well done KNUT!! 🙂

Add the Dynamics 365 connection for the tab in the channel

Knut chooses the correct opportunity record.

When Knut is done, he can see the newly created connection message in Teams. The above message indicates that Teams and Dynamics successfully connected.

The harmony begins

Kjetil begins right away with the PowerPoint they will need to win this deal. Kjetil does not have a license for Dynamics, so he creates the PowerPoint in Teams because this is the natural place for collaboration.

Knut can now choose to navigate Teams or Dynamcis 365, because the systems are working with the same document location.

Knut and Kjetil represent 2 different work processes, but are harmonizing well when referring to the ONE TRUTH document. Well done you to!!!

Dynamics and Teams in perfect harmony!

Dynamics 365 – Teams Configuration

The configuration of the client is pretty straight forward. A typical office product, and that is a good thing:) FYI, it does not install a solution file within Dynamics, and I like that a lot… Never been a fan of the overcrowding of solution files (Hint hint portals.. hehe).

Start pÃ¥ opening the system settings from Dynamics and locating the “Enable Dynamics and Teams integration”.

NB! Before starting, I would create a new Team and a new channel just for the sake of simplicity. Also create a new record in CRM that you want to connect to.

It took me about 3 minutes before I received my complete message, so be patient!

Open teams and locate the App Store within teams and search Dynamics. You will find it on the “…” menu on the left side.

Add to the team you created. In my case “Tilbud” and then click Open

Next step is connecting it to the channel in the team, and hit “Set up”.

Now it will ask you for an entity to connect to, so I am going to choose the Opportunity I created before I started the configuration “Teams Opportunity”.

If it all went well, you will now see a new tab in your channel with the name of the record. You also see a message that the record is connected.

The result

Dynamics and Teams working together

The art of creating relevant demo data

If it is one thing I have learned throughout the years, it has been to produce relevant demo data. Whatever you do, NEVER use data with the name “test”. The second a potential customer doesn’t relate to your presentation, they will loose focus.

Try to understand your customer before demo, and ask them to give some names of companies and products they sell. In the beginning your demo might only bee within a group of people that actually want your product, but eventually you might have to present to the people who hate change. It takes a little more time, but can be worth it in the long run.

A sample list you could as for in regards to sales demo could be:
1. List of 2-3 sales people
2. Short list of customers
3. Customers contacts (names only)
4. List of typical products/services they sell
5. A sample report of sales activity – Only if you have the time

It might sound stupid, but you have to remember that you are the person about to introduce change to the organization. Not many people are happy about change, and therefore you need to pay attention to the small details to keep their interrest.

1-4 are fair pieces of data that you easily can enter. Nr 5 is something I would do only if you had the time. A sales report might reveal a lot of fields/categories/processes they currently use. This can have a lot of value to include in your Oppty, but it might also take to much time to configure.

This blog is a part of a series of “Demo Sales – Simple Sales“, so I will only show simple examples. The demo I will be showing is based on sample data from MS.

Power BI RLS report for Dynamics 365

RLS stands for Row Level Security and is a function within Power BI used to securely manage what the users see. I am reusing the steps from the Power BI embedding blog, and continuing with the same dataset to define RLS. Another big thanks to Jeroen Vos for teaching me PowerBI.

We start the process in Power BI for Desktop. Open the same report, and then navigate to Modeling and Manage Roles.

This brings up a DAX console, and I will chose the “Address 1: Country/Region”

Now we can test the DAX by simulating how it is with another user login. This function is something I wish we had in Dynamics!!!

Notice that the data has changed!:)
NB! Remember to publish changes to PowerBI.com

Log into https://www.powerbi.com to complete the rest of the process

Next step is to add a user to the newly created security role. Navigate to datasets and open the security.

Last step is to Share the Dashboard with the user

Open Dynamics 365 and add a new Power BI Dashboard.

The Administrator (All data)

The Sales user (Only USA)

RLS reporting in Dynamics 365, secure and supported 🙂

Power BI embed to Dynamics 365 form with filtering

There have been several post about this topic before, but this one is the only way I got it to work. Rasmus wrote about this a few weeks ago, and I am using most of his code. Ida was also early out mentioning this possibility, but I just couldn’t get it all to work before now. Big thank you to Jeroen Vos for BI assistance:)

Bear in mind that I had to start from scratch here to make sense of it all. You can fast forward quite a bit if you already have a data model. I believe Microsoft will release a OOTB function sometime this year, but until then we can demo embedded BI in CRM forms like this.

Create a report

Start by opening Power BI dashboard, and creating a new project with “Get Data”

If you don’t know where to find the developer settings, you can copy the url from above, and just replace it with your org and crm* that you have in your country.

For this demo I am only choosing Account and Opportunity.

After loading, add the funnel graph.

Add the field salesstage and estimtedvalue. Both are from Oppty table.

Your report should resemble something like this. Now we have to format quite a bit for this to actually look presentable in Dynamics. Because this solution is highly custom at the moment, we need to make it fit the Dynamics IFrame for it to look decent.

The most important format of them all is the page format to the right. You need to make this one small for the Dynamics Tab to be able to open it in full screen. I made it half of the standard. Eventually you should end up like something below:

Numbers on the right are a picklist, but for the demo I didn’t care to rename them.

Publish to powerbi.com

Remember to copy the URL here

Dynamics 365 form configuration

This process requires a webresource with javascript and a tab with IFrame in Dynamics. Because of the new UI this layout is actually quite nice!

URL can be any website since we are overwriting it anyway. The name of the iframe is used in the javascript. Don’t restrict any cross-frame scripting.
function SetBIFrame(executionContext){
    var formContext = executionContext.getFormContext();
    var pbiFrame = formContext.getControl("IFRAME_BI");
    var GUID = formContext.data.entity.getId().replace(/[{}]/g, "");
    //replace the Power BI url with the url from the Embed step
    var PBIurl = "https://app.powerbi.com/reportEmbed?reportId=d86fdc2b-316a-420e-b177-9e477c879031&autoAuth=true&ctid=83121429-cfda-4a1b-89c9-969eb42dc605";
    //accounts = account table in BI, and accountid=guid for account
    pbiFrame.setSrc(PBIurl + "&filter=accounts/accountid eq '" +GUID+ "'");

Only thing you need to change is the URL from the powerbi.com secure embed. Since I am using account and opportunity out of the box, the table names for both of them are “accounts” and “opportunities”.

In the filter above I am filtering the results in the Account table with the account ID that i will find within CRM. The result is to show a graph for only that single account.

Remember to Pass Execution Context here. I don’t really now why, but it wont work without. Normally when I script I don’t have to use this, but if someone would tell me what it does I am happy to learn:)

Publish all settings and open Dyanmics 365 to the account (that you know has some opportunities).

As you can see Alpine Ski House is showing a sales funnel of the opportunities related and nothing more. This is a filtered report in Dynamics based on the account in a BI tab on top. Navigation here in dynamics is pretty smooth.

Power BI embedded dashboard Dynamics 365

Download Power BI Desktop https://powerbi.microsoft.com/en-us/desktop/
and login to the Power BI with your credentials.

Then download the content pack file for Power BI

Open the .pbix file in Power BI desktop, and it should look something like this

If for some reason the dashboard isn’t showing any data, you might need to run through the Power BI Sales Analytics fix for Dynamics 365

Next step is to publish this to Power BI

Open https://www.powerbi.com and locate the report you uploaded. A report itself can’t integrate with Dynamics, so we have to create a Dashboard for CRM to be able to pick this up. Open up the report

Find a chart you like and pin it

Continue the process for the charts you like, but add them to the existing dashboard “CRM Sales”. Eventually you might have a dashboard looking something like this:

NB!!! I had to make the size of these charts fairly large. Otherwise Dynamics 365 was doing strange things with scaling. Just try different approaches.

Now we have to configure Dynamics 365 to allow Power BI embedded reports. Open https://www.admin.powerplatform.microsoft.com for Environment settings.

Open CRM in your app and you can now add a BI Dashboard.

The result will be nice if you remembered to scale the Dashboard in PowerBI.com large enough.

One little side note. At the moment I can only see the option to add Personal Dashboard with Power BI embedded.

Dynamics 365 app for outlook tracking

The purpose of this exercise is to see tracked items in outlook that provide an important visual aid for the user. Why this is not default on I honestly don’t know.

Download the OrgDbOrgSettings tool from GitHub https://github.com/seanmcne/OrgDbOrgSettings/releases/

Version might change over time, but you get the idea

Navigate to the solution import of dynamics, and for now you have to use the classic view! notice the force classic in the URL.

You will now be able to see items as tracked in Dynamics 365

Installing SharePoint connector Dynamics 365 Online

The SharePoint standard connector will work for customers with simple needs for collaboration. There is a Teams integration available soon, and I will write about that once it is released in Europe.

Start off by creating a new site in SharePoint. I prefer to create everything on a new site, because then we can control the site better.

Copy the URL of the site before you move on back to CRM.

I prefer to create folder for the entities Account and Opportunity. Remove all the other entities in the simple demo (not that it really matters).

I prefer to have a structure based on account. This will create opportunity folders bellow the account folder.

If it all worked out, you can now open an opportunity with account connected.

Opening the document on opportunity will now give full access to storing documents in SharePoint. I will write an extended blog about considerations to make when integrating this to Teams later.

Installing Dynamics365 app for Outlook

Open your dynamics instance and remember to force classic mode. The new UI hasn’t updated at the time writing this blog. At the end of the URL “?forceClassic=1”.

Select “Automatically add the app”, then click Save. The status will change to Pending, and the app will be added in the background. It might take a few minutes.

Open outlook via https://www.office.com

Some system emails in trial are special and might not work, but you should see the icon in the upper right hand corner next to reply all and the “thubs up”. Open the app.

This is what you see when the app is loaded in your Outlook. More about the app in a later post.