Wednesday, September 23, 2020

Dynamics 365 and Power Platform monthly reading list August 2020

Technical topics (Configuration, customization and extensibility) 

Topics for Dynamics 365 Business Application Platform consultants, project managers and power users

Wednesday, September 09, 2020

Fixing current .NET SDK does not support targeting .Net Core 2.2 in Visual Studio 2017

 I encountered below exception when building a ASP.NET Core project in Visual Studio - "The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or use a version of the .NET SDK that supports .NET Core 2.2".


Luckily this forum post pointed in the correct direction - first check the installed version of the .NET Core SDK on your machine. 

If you are using Visual Studio 2017, you will need to install 2.2.1xx of the SDK to support targetting .NET Core 2.2. You can download the different versions of the .NET Core 2.2 SDK on https://dotnet.microsoft.com/download/dotnet-core/2.2 

Thursday, September 03, 2020

Palm oil price vs SIPEF stock price in Jupyter notebooks with Quandl

Quandl also offers free commodity price data for almost 100 commodities ( See API for commodity data) so I decided to create a Jupyter notebook comparing SIPEF's stock price with the price of palm oil. Take a look at the full notebook I shared on github if you want to learn why - https://github.com/jorisp/tradingnotebooks/blob/master/Quandl_API_Euronext_SIPEFPalmOil.ipynb 

 


Remarks:

  • Be careful when embedding images in a Jupyter notebook that you want to publish on Github (see Images in Markdown not showing when uploaded to Git for a discussion on this) - filenames are case sensitive - I got it working using the url syntax
  • To store the quandl key I used the approach outlined on how to use secrets in Jupyter Notebooks with python-dotenv
  • I really like Matplotlib and its versatility in rendering capabilities  in this notebook I used the ability to visualize multiple time series (see code preview below) with different axes. (see code below)

sipcolor = 'tab:red'
fig,ax1 = plt.subplots()

ax1.plot(data['SIP'],color=sipcolor)
ax1.set_ylabel('SIPEF',color=sipcolor)
#Instantiate a second axes that shares the same x-axis
ax2 = ax1.twinx()
ax2.plot(data['PPOIL'])
ax2.set_ylabel('PALM OIL USD')
plt.gcf().set_size_inches(15,8)
plt.show()

Related posts:

Tuesday, September 01, 2020

Quick tip: workaround kernelspec module not installed with jupyter notebooks in Visual Studio Code

This weekend I tried out working with Jupyter Notebooks in Visual Studio Code. Since I already have Jupyter up and running as part of the Anaconda distro I thought this would be easy but it took me longer than expected. 

First step is to install the Python extension for VS Code  and then you can start working with existing Jupyter Notebooks by just double clicking an existing notebook. Unfortunately this immediately threw an exception "Error: Jupyter cannot be started. Error attempting to locate jupyter: 'Kernelspec' module not installed in the selected interpreter." The workaround suggested on StackOverflow Python/Jupyter notebook in VSCode does not use the right environment did not resolve the issue and also the fixes described on Github - New version tries to install kernelspec were not working.


The workaround which seems to be working for me is starting VS Code from the Anaconda Prompt in the Jupyter workspace directory by typing "code ."




Wednesday, August 26, 2020

Dynamics 365 and Power Platform monthly reading list July 2020

Technical topics (Configuration, customization and extensibility)
Topics for Dynamics 365 Business Application Platform consultants, project managers and power users

Friday, August 21, 2020

Notes on learning to work with the Microsoft Graph API

Microsoft Graph is a REST API which allows you to access Microsoft Cloud services (e.g. Office 365 service like Microsoft Teams, OneDrive,Planner, SharePoint, etc.. but also enterprise mobility and security services like Azure AD, Identity Manager, etc..) resources using a single endpoint. You can use it for example for querying data in Outlook/Exchange and OneDrive but in the past couple of weeks I mainly used it for Microsoft Teams. The easiest way to get started with the Microsoft Graph API is the Microsoft Graph Explorer.


I learned quite a lot from the 30 days of Microsoft Graph blog series - a highly recommended starting point - for other resources take a look at the references section below.


References:

Friday, August 14, 2020

Don't forget to update older client applications for Dynamics 365 to the correct .NET Framework version

I lost 30 minutes this morning when trying to troubleshoot an older console app (written in 2017) which refused to connect to Dynamics 365 Customer Engagement. It was only after updating the Nuget packages for Microsoft.CrmSdk.CoreAssemblies  that I noticed that I was still building against .NET Framework 4.5.2 which is not supported anymore.


Reference:


Thursday, August 13, 2020

Quick tip: SQL access to Common Data Service using Tabular Data Stream (TDS)

Recently Microsoft announced Power BI DirectQuery support (in preview) to the Common Data Service (CDS)  using Tabular Data Stream. You can also leverage this  CDS TDS endpoint within SQL Server Management Studio to write SQL queries against the CDS database. You can connect using the base url of your CDS instance and add the port 5558. To authenticate you will need to use Azure Active Directory - Password.


By default this functionality is not enabled, so you if you try to use SQL Server Management Studio you will get below exception.

As outlined on http://aka.ms/enablesqlforcds, you will need to to go the Power Platform Admin Center to switch on the TDS support.

References:


Tuesday, August 11, 2020

Quick tip: find duplicate records in Dynamics 365 with Deduplicator plugin for XrmToolBox

 If you want to quickly scan your Dynamics 365 or CDS instance for duplicate records, take a look at the Deduplicator plugin for XrmToolbox. It provides you with the option to specify one or more fields for a specific entity as matching criteria (with option to ignore blank values, leading and trailing white space and taking into account casing) and choose which additional fields to display for the duplicate results. 


Friday, August 07, 2020

Notes on the Power Virtual Agent in a day lab

Microsoft recently also released a Power Virtual Agent in a day and I decided to give it a try. Power Virtual Agents are one of the components in the Power Platform which allow you to built intelligent chat bots without any coding or AI experience.

Since Power Virtual Agents are built on the Power Platform and the Azure Bot Framework you still have the option to extend the capabilities to suit your organisations needs.

Some notes on the Power Virtual Agent lab:
  • The creation of a virtual agent or bot is super easy and intuitive with a simple graphical interface for authoring the logic  that will drive your bots. The authoring canvas for the conversation tree has a great user experience and enables non-developers to create a powerful chatbot experience.

  • After you import the SolutionPowerVirtualAgentInADay.zip solution file, you will need to reconfigure the connections in the different Power Automate Flows - to do this you will need to use the unique name of the CDS instance - so if you have used a Dynamics CRM instance you can not use the readable name - don't forget to add the region shorthand as well.
  • If you are familiar enough with Dynamics 365 and/or Power Platform you will be able to complete the labs in a couple of hours.
  • The built-in integration with Power Automate allows you to leverage the over 250+ external services and systems so the only limit is your imagination.

References:

Saturday, August 01, 2020

Quick tip : how to check if a Microsoft Teams channel exists in a Power Automate Flow

The new Microsoft Teams connector (Preview) in Microsoft Power Automate Flow makes Microsoft Teams automation scenarios a lot easier. The List channels action will return you a list of one or more channels for a Team. If you want to check if a channel with a specific name already exists you can  use the contains function. (For a good overview see Reference guide to using functions in expressions for Azure Logic Apps and Power Automate)


Tuesday, July 21, 2020

Setting up Omnichannel for Customer Service on an existing Dynamics 365 trial

Omnichannel for Customer Service is a Microsoft first party Dynamics 365 app which extends Dynamics 365 Customer Service which enables you to connect different channels (SMS, chat, Facebook, etc...) to your existing Dynamics 365 Customer Service App.

Listed below are  the different steps required to setup a demo scenario with chat integration for Omnichannel for Customer Service in a blank (no first party app selected upon trial setup) demo trial environment  which had customer service installed afterwards:

  1. Omnichannel for Customer Service is an add-on which requires a separate license so you first need to add this add-on in your tenant. Go to Billing > Purchase Services and select add-ons. Search for Dynamics 365 Customer Service Digital Messaging add-on trial and select it.
  2. After enabling the add-on you will need to provision Omnichannel for Customer Service by first providing data access consent and in a next step provisioning the Omnichannel for Customer Service application. The official Microsoft documentation still show how to to this from the legacy Dynamics 365 admin portal but you can do this from the new Power Platform Admin Portal as well - click the three dots and select manage for the Omnichannel for Customer Service
  3. In the separate Omnichannel for Customer Service screen you will be able to enable the different channels that you want to support. The initial setup might take a couple of hours to complete so check the same page for the status of the setup later on.
  4. Next you will need to assign the "Dynamics 365 Customer Service Digital Messaging add-on" license to the users who need have a  Omnichannel for Customer Service security role.
  5. To enable chat integration, you need to create a code snippet to embed the chat control on your website or portal. You can follow the steps on the Microsoft Omnichannel for Customer Service Administrator > Quickly configure a chat widget  which use a Customer Service Portal but you can add this chat widget to your own website as well.
  6. Support agents can use the Omnichannel for Customer Service app to interact with the users to follow up on their questions and complaints. When a new conversation comes in, it will be routed to available agents who can accept this incoming conversation. (Take a look at Understand unified routing and work distribution to understand how you automate work assignment across channels taking into account agent's capacity and skill sets)
  7. A customer agent will be able to interact with the customer using an inline chat window which is built on top of the Customer Service application which means that you will be able to leverage the full available context of the customer (existing contact info, open cases, etc ...)
There were lot of new features added to Omnichannel for Customer Service in the 2020 release wave 1 so definitely take a look at the Microsoft Business Applications Summit recording below or take a look at the Omnichannel for Customer Service sessions on Microsoft Learn.

References:

Thursday, July 16, 2020

How to use secrets in Jupyter Notebooks with python-dotenv

It is not a good idea to embed the the secrets (credentials, keys, etc..) that you need in your Python code directly in your Jupyter Notebooks. You can store these secrets in environment variables but an alternative is using the python-dotenv library. Python-dotenv is a library that reads key-value pairs from  a .env file and adds them to environment variables.

To get started you need to install the latest version of python-dotevn and then you will need to create a .env file in the same folder as your .ipynb files.



Tip: You may not be able to create .env file directly in Windows Explorer - use the command prompt and the echo command to create this file.




You can read a key-value pair in just one line of code after you loaded the extension and the os module which provides functions to interact with the operating system.



Source code is available on https://github.com/jorisp/tradingnotebooks/blob/master/dotenv.ipynb

References:

Wednesday, June 24, 2020

Using a personal access token in Postman to query the Azure DevOps Services REST API

If you want to query the Azure DevOps Services Rest API you first need to be authenticated. The easiest way to do this is to generate a Personal Access Token. If you want to use this token in Postman to authenticate you will need to use Basic authentication, leave the username blank and copy the token in the password input box.

Saturday, June 20, 2020

Dynamics 365 and Power Platform monthly reading list May 2020

Technical topics (Configuration, customization and extensibility)

Topics for Dynamics 365 Business Application Platform consultants, project managers and power users

Wednesday, June 17, 2020

How to fix a broken Easyrepro project after upgrading Chrome

After I recently upgraded Chrome I noticed that my Easyrepro test project did not build/run anymore. (read Easyrepro - UI automation test library for Dynamics 365 and  CDS if you are not familiar to Easyrepro)

Luckily the exception pointed in the correct direction "System.InvalidOperationException: session not created. This version of ChromeDriver only supports Chrome version 79 (SessionNotCreated)".


The EasyRepro testing framework leverages Selenium ChromeDriver so you need to check the compatibility - see https://chromedriver.chromium.org/downloads 

To fix the error I just had to update the Nuget package to a version which is compatible with the installed Chrome on my machine.



Storage capacity enforcement for CDS instances

Storage capacity enforcement now seems to activated, this means that when your capacity storage is greater than the entitled capacity, admin operations like creating, copying and restore environments will be blocked.

Thursday, June 11, 2020

Farewell to the Dynamics 365 Admin Center

In 2019 Microsoft announced that they would consolidate the different admin centers for Power Platform and Dynamics 365 Sales/Customer Service/Field Service. In the meanwhile, more and more functions seem to be moving to the new Power Platform Admin Center. Although the legacy Dynamics 365 admin center deprecation is not listed (yet) on the Important changes (deprecations) coming in Power Apps, Power Automate and model-driven apps in Dynamics 365. I expect this admin portal to quickly fade away.  

Update June 28th: @jukkan just mentioned that there is an update in Message Center which officially states that the old Dynamics 365 Admin Center will go away. I like the speed of innovation in the cloud but this seems like incredibly short notice.



To be able to access the Power Platform Admin Portal you will need to assign an appropriate service admin role - see Use service admin roles to manage your tenant for more details.

Features/functionality which is now surfaced in the new Power Platform Admin Portal:
  • App management in the Applications tab of the legacy Dynamics 365 Admin center has now moved to Power Platform Admin Center - see  Manage Dynamics 365 Apps for more details. This applies to installing and managing Microsoft first party apps like Customer Service but also to other apps installed through AppSource. You first need to select your environment in the new admin center and use the Resources>Dynamics 365 apps menu to open the list of available apps to install. This same screen can be used to upgrade existing apps to newer versions. (Unfortunately there is no indication when there is a new app version available)





Friday, June 05, 2020

Quick tip: exporting all nuget packages used in Visual Studio solution to text file with PowerShell

Although it is possible to manage Nuget packages at solution level in Visual Studio with the possibility to even consolidate the Nuget packages it might be useful as well to have an overview of all of the packages that you use in another format. 



The below PowerShell code snippet allows you to export all used Nuget packages to a text file (you can ignore the exceptions thrown because of  projects without Nuget packages).

Get-Content .\[yoursolutionname].sln 
| where { $_ -match "Project.+, ""(.+)\\([^\\]+).csproj"", " }
| foreach { "$($matches[1])\packages.config" } | % { Get-Content $_ | Find "<package id" } | Sort-Object -Unique | Out-File -FilePath c:\temp\packages_demo


Tuesday, May 19, 2020

Dynamics 365 and Power Platform monthly reading list April 2020

Dynamics 365 and Power Platform -2020 Wave 1 Topics

Technical topics (Configuration, customization and extensibility)
Topics for Dynamics 365 Business Application Platform consultants, analysts, project managers and power users