• About

Information Dynamics

Information Dynamics

Category Archives: Dynamics CE 9

Business Process Flows

29 Wednesday Jul 2020

Posted by GIRISH SRINIVASA in Dynamics 365 CE Online, Dynamics CE 9, Uncategorized

≈ Leave a comment

Tags

Business Process Flow

In this article we look at ways of automating certain business processes while developing an xRM application on Dynamics CE platform. There are actions, workflows, business process flows and dialogues that can be used for the purpose of automating business processes. For Dynamics CE Online Microsoft Flow is gaining more traction for achieving business process automation and this will be covered in a separate article at a later stage.

Business Process Flows (BPF):

  • Key focus is to ensure that the users consistently enter data and follow a set process to complete the transaction.
  • Contained in a custom entity and a record will be created within this entity for each user initiated process. Business Process Flows can span more than one entity as long as there is 1:M relationship between the two entities.

Steps for Creating Business Process Flow:

In the illustrative sample we look at implementing process flow for the following scenario against “Lead” Entity. Every step of the process flow will be a Stage.

Stages Identified to implement Business Process Flow:

  • A new application details are entered – Stage > Submission
  • The details are reviewed – Stage > Review
  • Application Decision (Approve/Reject) – Stage > Decision

BPF1

BPF2

 

The process flow designer window provides components to implement flow.

BPF4

The components of the designer include Stage, Condition for orchestration and Data Step, Workflow providing input values for the flow.

Designing Stage(s)

BPF5

Now define the mandatory data elements required for the Submission stage

BPF6

Once the fields are entered in the Submission stage the next step will be Review Stage

BPF7

Add a Condition component (If … Else)  for Creating a Member Record (For Approved Application) / send notification for Rejected Application

  1. Condition to check for Creating a Member Record

BPF8

2. Condition to check for sending notification for Rejected Applications

BPF9

3. Validate and Activate the Business Process Flow

BPF10

 

How does the above designed Business Process Flow work?

Create a new Prospect Record the UI will display a flow interface with the “Submission” stage marked Active.

BPF11

BPF12

Once Submission Stage is complete Next Stage will take to “Review”

BPF13

BPF14

BPF15

 

 

 

 

 

 

 

 

 

Generating EarlyBound CRM Entities using Spkl Task Runner

16 Thursday Apr 2020

Posted by GIRISH SRINIVASA in Dynamics 365, Dynamics 365 CE Online, Dynamics CE 9

≈ Leave a comment

Tags

earlybound entities, Spkl

In article we looked at how connection to CRM On-Premise can be established using Spkl  Task Runner. For developing Plugins, Workflows it is a common  to have early bound classes. CrmSvcUtil.exe facilitates generating early bound classes the same can be achieved using Spkl Task Runner.

The batch file earlybound.bat will create the *.cs files as per settings defined in spkl.json file

Untitled1

As per the settings defined the following will be expected output when earlybound.bat is run:

  • A single file name SbmaEarlyBoundTypes.cs containing definitions for entities specified
  • Namespace for the various classes will be SBMA.Crm.Entities
  • One *.cs file will be generated for every entity because of the setting “oneTypePerFile : true”, this can be set to false if the preference is work with only one *.cs file for all the entity type definitions

Right Click on the spkl folder and bring up the command prompt (if using VS 2019  install the extension Web Essentials 2019 so the command prompt can be launched from Visual Studio IDE)

Untitled3

Untitled2

Now run earlybound.bat

Untitled4

Untitled6

The created types is as highlighted below:

Untitled7

 

 

 

 

 

Solution Management

12 Sunday Apr 2020

Posted by GIRISH SRINIVASA in Dynamics 365, Dynamics 365 CE Online, Dynamics CE 9

≈ Leave a comment

Tags

Managed, Unmanaged

A xRM application built on Dynamics CRM platform consists of several components viz.,

  • Schema: Entities,Relationships between Entities, Option Sets
  • User Interface: SiteMap, Web Resources, Application & Entity Ribbons
  • Anlaytics: Reports, Dashboards
  • Code: Workflows, Plug-ins
  • Security: Roles (built-in and custom), Field Security profile
  • Templates: E-mail, Articles

The above can be packaged up as Unmanaged or Managed solutions so it can be deployed in the target environment.

Managed Solution: A self contained packaged  that can be installed/uninstalled in target environment. No ability to add/remove solution components, changes can made to solution components if already set through managed properties.

Unmanaged Solution: An unmanaged solution provides the ability to add/remove components, delete components (custom entities etc). All the components in unmanaged solution will be references to customizable components in the CRM organization.

When both unmanaged and managed solutions are imported into an organization, conflict resolution is done through Merge and Top Wins stragety

Merge: Applies to user interface components and unmanaged customizations will be last to be applied.

Top Wins: Applies Entities,Views, Security Roles. In case of managed solution the last managed solution imported will have the changes applied and on of this when an unmanaged solution is imported then previous changes are overwritten.

Example:

Consider a solution having “account” entity

solutionlayering1

solutionlayering2

Create two versions using “Clone a Patch” option to change the label on the Account form.

solutionlayering3

solutionlayering4

Change the Phone number label text for the above solution

solutionlayering5

Publish the changes and the Account form view will be:

solutionlayering6

Now create another Clone to Patch version 2:

solutionlayering7

solutionlayering8

The view of Account form after publishing the changes note this is the last Unmanaged Solution to be published.

solutionlayering9

Business Rules

10 Friday Jan 2020

Posted by GIRISH SRINIVASA in Dynamics CE 9

≈ Leave a comment

Tags

Business Rules

Business rules provide the capability to:

  • Perform data validation
  • Display Error messages
  • Display/Hide fields
  • Enable/Disable fields

The above can be achieved by writing less complex code and rules can be implemented with aid of Business Rules designer.

In the example below we will implement Business Rules on Event entity to check if Start Date is greater than End Date and if true then display a error message.

BusinessRule1

Clicking on New brings up the rules designer window. Every Business Rule always starts with a condition and this is reflected when the rules designer window dialogue is displayed

BusinessRule2

In the Properties tab enter a Display name for Condition and apply the required rule by selecting the drop down list values

BusinessRule3

BusinessRule4

As shown above we are implementing the check condition Start Date > End Date click on Apply 

BusinessRule5

If the check condition is true then display a error message. These will be under Components tab drag and drop Show Error Message component next to the Condition

BusinessRule6

BusinessRule7

Validate the business rule by clicking on the Validate button. Other attributes that can be modified include rule name and description. Once saved activate the business rule to come into effect.

BusinessRule8

BusinessRule9

 

 

 

AutoNumber using XrmToolBox

26 Thursday Dec 2019

Posted by GIRISH SRINIVASA in Dynamics 365, Dynamics 365 CE Online, Dynamics CE 9, Uncategorized

≈ Leave a comment

Tags

Autonumbering

Xrmtoolbox provides a plugin “Auto Number Manager” that can be used to configure autonumbering for any entity in the CRM solution. Refer here for list of available plugin’s. Once AutoManager plugin is installed it will be available in the start up page of Xrmtool box

AutoManager1

Once connected to CRM organization (aka Instance) the list of solutions will be displayed as per below and selecting a solution will display the list of entities for that solution:

AutoManager2

In the following example autonumber format is set for the Account Number field of Member entity

AutoManager3

AutoManager4

The Number Format set in above is as per below

{PreFix}-{6 digit sequence number}-{Random String}

Seed value indicates the starting number of sequence

Click on Update once the format is acceptable.

AutoManager5

 

 

 

 

Configuring Claims Based Authentication for Dynamics 9 on ADFS 4.0

04 Friday Oct 2019

Posted by GIRISH SRINIVASA in ADFS 4.0, Dynamics CE 9

≈ 1 Comment

Adding on-premise Dynamics 9 as a Relying-Party (RP) trust in ADFS 4.0 follows the same path as listed here but ADFS 4.0 has few changes to wizard options as detailed below:

CBA1

In the next step of the wizard make sure the metadata end point is accessible through IE, in the example below the URL is https://crm.idynamics.dev/FederationMetadata/2007-06/FederationMetadata.xml, give a display name and choose Next

CBA2

 

Access Control Policies defines the level of access that can be provided to RP

Untitled

Click Next after reviewing the following settings

Untitled1

The Relying Party (RP) will be added successfully the next step will the configuring Claims Issuance Policy (aka adding Claims Rules in ADFS 3.0 and below…)

Untitled2

Right click on RP and select Edit Claim Issuance Policy and add the claims rule set as indicated here

Untitled3

Once the RP has been successfully accessing the CRM organisation will display the following error because of certain defaults in ADFS 4.0

Untitled4

In the event viewer on ADFS server the above error will translate to a MSIS7102 error code of ADFS indicating an unsupported Authentication Method

Untitled5

In order to identify the Authentication Method  extract the redirection URL from CRM to ADFS and you will notice that Windows Integrated Authentication (WIA) is used as per wauth parameter, and this is not enabled in ADFS by default for Intranet scenarios

https://adfs.idynamics.dev/adfs/ls/?wa=wsignin1.0&wtrealm=https%3a%2f%2fcrm.idynamics.dev%2f&wctx=rm%3d1%26id%3df589b041-3924-4d87-a8f1-96057169b19f%26ru%3d%252fAPIS%252fdefault.aspx%26crmorgid%3df3f230c0-ddc6-e911-837e-0017fb000002&wct=2019-09-04T11%3a03%3a41Z&wauth=urn%3afederation%3aauthentication%3awindows

Bring up the ADFS management console and edit Primary Authentication Methods to include Windows Authentication and restart ADFS

Untitled6

Untitled7

Configuring Claims Based Access in ADFS 4.0

29 Sunday Sep 2019

Posted by GIRISH SRINIVASA in ADFS 4.0, Dynamics CE 9

≈ Leave a comment

The claims rule set required for configuring CRM platform with ADFS is described here in ADFS 4.0 on Windows Server 2016 the management console has few changes to the wizard as detailed below essentially Claims Rules are now identified as Access Control Policies:

CBA1
CBA2
CBA3
CBA4
CBA5

 

Adding a New User CRM 9.0 Plug-in assembly error

20 Friday Sep 2019

Posted by GIRISH SRINIVASA in Dynamics CE 9

≈ Leave a comment

Tags

Adding User

While adding a new user if you get the following error

AddUserError1

The downloaded log file will indicate permission issues for one the DLL’s

Unhandled Exception:

…………[rest of exception content]……..

Microsoft.Crm.CrmException: Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. —> System.IO.FileLoadException: Could not load file or assembly ‘file:///C:\Program Files\Microsoft Dynamics CRM\server\bin\assembly\Microsoft.Dynamics.Service.Plugins.dll’ or one of its dependencies. Access is denied.

The above exception will be related to CRM app pool account not having the necessary permissions to C:\Program Files\Microsoft Dynamics CRM\Server\bin and subsequent inheritance to C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly folder and permissions inheritance is not enabled by default

Steps to grant the required permission are:

  • Enable inheritance from Folder Properties > Security > Advanced

AddUserError2

AddUserError3

  • Add CRM App pool account to have full permissions to C:\Program Files\Microsoft Dynamics CRM folder

AddUserError5

  • Reset IIS

Now a new user can be added to CRM Org without any error

Failure to access CRM Organization URL with FQDN on the server

18 Wednesday Sep 2019

Posted by GIRISH SRINIVASA in CRM 2011, CRM2013, CRM2015, CRM2016, Dynamics 365, Dynamics CE 9, Uncategorized

≈ Leave a comment

After installing CRM platform and changing the web address from Deployment Manager console as per below

DisableLoopBack

It will not be possible to browse the Organization created from Deployment Manager and the event viewer will record “Event 4625 Audit Failure NULL SID failed network logons..” this is because of LoopbackCheck feature of the Windows Server that prevents IIS sites being accessed using FQDN in the URL. Run the following PS command to disable the loopback check

New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1” -PropertyType dword

Also check that the CRM application pool account has the correct SPN set as an example for FQDN crm.idynamics.dev the SPN for app pool account will be

DisableLoopBack1

 

 

Issues and Limitations of Claim-based authentication when used with Dynamics CRM

20 Tuesday Oct 2015

Posted by GIRISH SRINIVASA in ADFS, ADFS 4.0, CRM2015, CRM2016, Dynamics 365, Dynamics CE 9

≈ Leave a comment

The following are some of the limitations of accessing Dynamics CRM platform using Claims-based authentication

  • Dynamics CRM does not enforce strong password policy and this task is handled by AD.
  • ADFS federation server sessions are valid up to 8 hours for deactivated or deleted users. The ADFS server tokens allocated to a web single sign-on (SSO) have cookie expiration of 8 hours. Therefore even when a user is deactivated or deleted from authentication provider as long as the user session is still active the user can continue to be authenticated to access resources.
  • Certificates created using the CNG key template are incompatible with Microsoft Dynamics CRM.
  • CRMAppPool account used for Dynamics CRM website must have read permission to the private key or encryption certificate.

Work around option(s):

  1. Disable the user in Dynamics CRM and AD.
  2. Reduce the ADFS token life time. (Power Shell). In ADFS 4.0 on Server 2016 TokenLifetime is replaced with SsoLifeTime and default is set to 480

 New Picture

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • November 2021
  • August 2021
  • July 2021
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • March 2019
  • September 2018
  • February 2018
  • January 2018
  • December 2017
  • January 2017
  • August 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014

Categories

  • ADCS
  • ADFS
  • ADFS 4.0
  • ASP.NET Core
  • Azure
  • Azure AD
  • Azure AD DS
  • Azure B2C
  • CRM 2011
  • CRM2013
  • CRM2015
  • CRM2016
  • Docker
  • Dynamics 365
  • Dynamics 365 CE Online
  • Dynamics 365 Portals
  • Dynamics CE 9
  • Knockout and TypeScript
  • OAuth2.0/OpenIDConnect
  • Power Platform
  • PowerApps
  • PowerShell
  • SharePoint 2019
  • Spkl
  • Uncategorized
  • WebAPI
  • Windows Server 2012
  • Windows Server 2016

Meta

  • Register
  • Log in

Blog at WordPress.com.

  • Follow Following
    • Information Dynamics
    • Already have a WordPress.com account? Log in now.
    • Information Dynamics
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...