xRM is back! – PowerApp, CDS, Dynamics 365

Yesterday Microsoft released information about the “PowerApps Spring Update” and gave us also the “Dynamics 365 Spring release notes”. In there you can read, that they merged features of Dynamics 365 with the Common Data Service. This “new product” is called Common Data Service for Apps.

BAP Overview

Attending the extreme365 I was lucky to have a little chat with Matt Barbour (Principle Program Manager) about this topic. Here are my key takeaways:

Common Data Service for Apps
One big thing is that Microsoft moved the hole Dynamics 365 CE 9.0 platform to azure, took the CRM platform, removed a lot of entities and more. This is what they call now “Common Data Service for Apps”. So if you buy now for instance the “Sales App” you are getting a managed solution on top of this Core called CDS.

The following picture shows these changes from v8 to v9:

21_03_2018 17_19 Office Lens 

It is already here!
Another takeaway from Matt: If you have a v9 CRM instance you already working on the new platform! Having a look at the solutions of my newly created v9 instance we can see two solutions called something like “CDS” or “Common Data Service”:

image

And if you are opening the solution eplorer you will recognize the PowerApp icon on the top left side:

image

Customizing is moving to PowerApps and CDS
One other thing is, that the solution explorer we know today will completely move from CRM to PowerApps and CDS. Today you can create on both sides new entities. So if you create an entity in CRM your getting the entity in CDS an vice versa.

Old New
image image

Is the CRM-database and the CDS-database the same?
Yes it is. There are no connectors or similar stuff doing synchronization.

Can I have only the Core-System so I can build my xRM-App?
No, not yet. But they are planning licenses to get only the Core-App without any apps like Sales on top.

Should I already use PowerApps and CDS for customizing?
My opinion today is No. Microsoft is working step by step. So the first step so far, was to merge CDS and the CRM platform. Next steps now will be for instance adding solutions to PowerApps. But have a look at it and become familiar with this new features. So you will be ready for the feature,


Cust.-rule #2: Use entity-icons!

Did you ever see navigation entries like this in the following picture on the left side? Doesn’t it look like “unfinished”? The entry on the right picture looks more professional, right?

image

Because of that: Always use icons, if you are creating a new entity – always! Doing this is really easy. This is the way I do this:

1. What icons do I need?
An entity needs two icons:
- 16×16 pixels
- 32×32 pixels (This is the one you can see then in the navigation.)

2. Get a tool!
There are several ways to create icons. I use very often the “Metro Studio” from Syncfusion. You can download this free tool from here.

image

3. Create the icons

# Description
1 Start the “Metro Studio”
2 Search your favorite icon in the top right corner or choose from the categories on the left side hand.
3 Once you found your icon, just click on it.

I use the following options for the 32×32 icon:
- Width: 32px
- Padding: 4px
- Icon color: #FFFFFFFF

image

Important: Use white color, because Microsoft does it too. So your icon will look like more “integrated” in the whole CRM app.4Click “Export” to save your icon in the png-format.5Repeat the same to create the 16×16 picel icon.

4. Add the icon the the entity

# Description
1 In Dynamics CRM navigate to your entity, open its properties and click “Update Icons” in the ribbon of the entity window:
image
2 Add the icons to the entity by adding a webresource. This is one way to do this:
image
image
image
image
image

5. Save and publish your entity – That’s it!


Error while activating BPF: “Invalid Business Process.”

Problem: Today I was not able to activate a business process flow. I got a business process error:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6D99E8D8Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ActivityId>c0b9f582-977a-49f6-b5ed-2209f1586a05</ActivityId>
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6D99E8D8</Message>
  <Timestamp>2017-12-11T16:29:45.6122634Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>c0b9f582-977a-49f6-b5ed-2209f1586a05</ActivityId>
    <ErrorCode>-2147089527</ErrorCode>
    <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Invalid Business Process.</Message>
    <Timestamp>2017-12-11T16:29:45.6122634Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

Solution: After some research I found the problem. There was a related Process which was in draft modus. After activating the process I was able to activate the BPF.

image


Import solution with PowerShell is not activating SDK-steps

Today I deployed a solution with SDK-steps with the following PowerShell (intro to CRM and PowerShell can be found here):

if (-Not (Get-Module -Name Microsoft.Xrm.Data.Powershell)) { 
     Import-Module Microsoft.Xrm.Data.Powershell 
}

$zipLocation = 'C:\Users\x.y\Downloads'
$timeoutInSeconds = 600

$crmOrg = Get-CrmConnection -InteractiveMode
Set-CrmConnectionTimeout -TimeoutInSeconds:$timeoutInSeconds -conn:$crmOrg

Import-CrmSolutionAsync -SolutionFilePath:$zipLocation'\SdkSteps_Managed.zip' -OverwriteUnManagedCustomizations:$true -conn:$crmOrg -MaxWaitTimeInSeconds:$timeoutInSeconds -BlockUntilImportComplete:$true

Problem: After deploying the solution most of the SDK-steps were disabled.

Solution: Adding the following Import-CrmSolutionAsync-parameter solved the issue: 

-ActivateWorkflows:$true

So this paramteres triggers not only the activation of workflows it activates also the SDK-steps.


Supported .NET Framework Dynamics 365 (4.6.1 not supported!)

Problem: After migrating a Dynamics CRM environment from 2016 OnPrem to Dynamics 365 Online I was getting the following error message every time a plugin or a custom-workflow-activity was triggered:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: 
Unexpected exception from plug-in (Execute): <Plugin.Message>: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ActivityId>6e625317-1f6a-46ff-8883-afaa96cb51ef</ActivityId>
  <ErrorCode>-2147220956</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Unexpected exception from plug-in (Execute): <Plugin.Message>: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.</Message>
  <Timestamp>2017-08-22T08:18:06.9730831Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault i:nil="true" />
  <OriginalException i:nil="true" />
  <TraceText>

Solution: After analyzing the problem and having a look at MSDN, I found out that the plugins CWAs were compiled with .NET-Framework 4.6.1 but only 4.5.2 is supported. After changing it back to 4.5.2, compiling and deploying everything worked well.


Latest version compatibility overview

Nice overview of the version compatibility and also nice information about solutions can be found here: https://msdn.microsoft.com/en-US/library/gg334576.aspx#BKMK_VersionCompat

 image


How to detect deactivated business rules of all entities?

Problem: Sometimes after a deployment of customizations business rules are deactivated. (Reason unknown..)

How can we check now all business-rules for their state if we don’t want to open every entity and check every single rule for its state? image

Solution: By the advanced find! (Column “Status”)

image


Error beim Solution deployen

Problem
Beim Deployen einer verwalteten Lösung, welche unverwaltete Komponenten in verwaltete konvertiert, trat folgender Fehler auf:

The AttributeLookupValue (Id=00000000-0000-0000-0000-000000000000) entity or component has attempted to transition from an invalid state: ComponentStateName: SystemUnpublished; ComponentOperation: Delete; ComponentSolutionType: Active; SolutionOperationContext: None; IsProtected: False; IsBeingPublished: True. 

Lösung
Nach einer fast stündigen Fehlersuche war am Schluss die Lösung einfach: Auf dem Zielsystem alle Anpassungen veröffetnlichen. Danach konnte die verwaltete Lösung ohne Fehler importiert werden.


Prozessaktivierung: “Ganzzahliger Wert liegt ausserhalb des gültigen Bereichs”

Problem

Beim Aktiveren eines Workflows erscheint folgende Fehlermeldung:

image

Die Protokolldatei liefert mehr Informationen:

A validation error occurred.  The value of ’1033′ in attribute ‘languagecode’ on record of type ‘workflow’ not a provisioned LCID.

Lösung

Auf dem Development-System, auf welchem der Prozess erstellt worden war, war das englische Sprachpaket aktiviert. Nach dem auf Prod-Mandanten auch das englische Sprachpaket (1033) aktiviert worden war, konnte der Workflow aktiviert werden.