Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft...

70
Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Transcript of Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft...

Page 1: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Gilad Levy, Senior Consultant MCS

Microsoft DynamicsTechnical BriefRelationship & Interaction Management Platform (xRM)

Page 2: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Challenges Supporting Line of Business Activities of Companies Today

RELATIONSHIP MANAGEMENT

PROCESS AUTOMATION

INTERACTION TRACKING

LOB MANAGEMENT

SILOED INTEGRATED

Multiple Solutions Invest in ONE!

LOB Applications Platform

Page 3: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Building an LOB Application

Entity, Fields & Relationships

Forms, ViewsBusiness

RulesProcesses Workflow Custom Code

Finished Application

Page 4: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

APIs

xRM Platform

Metadata Model

SalesWorkload

MarketingWorkload

CareWorkload Marketplace Custom Apps Partner Apps

AzureOffice 365 + SharePoint

Devices

Customers, Employees, Partners

ExtensibleArchitecture

Industry Template

Native xRM UI Custom UI

Page 5: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

On PremiseOnline Azure

SaaS IaaS

Deployment Models

Self-Hosted

UNIFORM capabilities across deploymentsDeployment Migration to any model using Deployment Manager

Compatible CRM On Premise Version Performance Scale Azure IaaS Support

Multi-Geo supported with DR Financially backed SLAAdmin Center

Page 6: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 7: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Customer

Reference

Data

Line-Of-

Business

Application

Platform for

Broad

Engagement

(Social,

Mobile)

Enterprise

Business

Leadership

Microsoft

Oriented

Enterprise IT

SMB

Page 8: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Custom Native Client Apps (iOS, Android, Windows)

Web AppsTraditional Server-based logic – ASP .NET, Java, PHP, NodeJS

“Single-Page Apps” using JavaScript on client

Data Integration Tools (SSIS, Scribe, Azure DF, BOMI, etc.)

BI Tools (PowerQuery, etc.)

App Builders (Power Apps)

Integration Frameworks (Azure Logic Apps, Biztalk, etc)

Custom Integration Code (many platforms)

Page 9: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

SOAP Services• Full functionality

• Optimized for .NET developer experience

• Very difficult to use from other platforms

Limited REST API• Limited functionality

• Basic CRUD & Query

• Poor Performance

Page 10: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Be open to all platforms

Match expectations of today’s developer audience

Approachable – Easy to accomplish simple tasks

Meet Enterprise RequirementsSecurity, Performance, Scalability

Build on standards to enable broad ecosystem support

Page 11: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Page 12: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 13: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 14: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

using System.Net.Http;

using Newtonsoft.Json.Linq;

HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "https://contoso.crm.dynamics.com/api/data/accounts");

request.Headers.Add("Authorization", "Bearer " + accessToken);

HttpResponseMessage response = httpClient.SendAsync(request).Result;

var responseBodyAsText = response.Content.ReadAsStringAsync().Result;

JObject responseObject = JObject.Parse(responseBodyAsText);

var propertyValue = responseObject["propertyName"];

Page 15: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

var new DefaultContainer new "https://contoso.crm.dynamics.com/api/data/"

var = from a in .

where a.name == "Fabrikam"

select a;

void service_SendingRequest2(object sender, Microsoft.OData.Client.SendingRequest2EventArgs e)

{

//use ADAL to set the access token

e.RequestMessage.SetHeader(authContext.AcquireToken(...).CreateAuthorizationHeader())

}

Page 16: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 17: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

//Client application must be registered in Azure AD

string clientId = ConfigurationManager.AppSettings["clientId"];

Uri redirectUri = new Uri(ConfigurationManager.AppSettings["redirectUri"]);

Uri apiUrl = new Uri("https://contoso.crm.dynamics.com/api/data");

//Ask the CRM instance who it trusts for authentication

AuthenticationParameters ap = AuthenticationParameters.CreateFromResourceUrlAsync(apiUrl).Result;

AuthenticationContext ac = new AuthenticationContext(ap.Authority);

AuthenticationResult ar = ac.AcquireToken(ap.Resource, clientId, redirectUri);

string accessToken = ar.AccessToken;

Page 18: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Primitive TypesString, Int32, Date, etc.

Complex Types

Entity TypesStructural Properties and Keys

Navigation Properties

Entity SetsContainers for collections of entities, support query

Functions and ActionsBound and Unbound

Page 19: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

/accounts(985519d9-e08e-4374-a7d4-d15763a448e7)?$select=name,accountnumber&$expand=ownerid

Page 20: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

GET /api/data/WhoAmI

{

"@odata.context": "https://tieara228org09.crm.crmlivetie.com/api/data/$metadata#mscrm.WhoAmIResponse", "BusinessUnitId": "677d2748-c42f-e511-80fa-00155d0a1303", "UserId": "c0ed9e36-5773-4355-be09-452510cb283b", "OrganizationId": "0e0b8108-0405-443c-926e-b471ab0c8492«

}

Page 21: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 22: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 23: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Client Server

ContactID of [email protected]?

User ID of [email protected]?

RegionID of NW Region?

AccountID for Account ABC123?

Update Account(AccountID, ContactID)

SetState(AccountID, Active)

Assign(AccountID, UserID)

Before

Client Server

After

Update Account(ABC123, [email protected], NW, [email protected], Active)

Page 24: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 25: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Entity account = new Entity("account", "accountnumber", accountNumber);

Page 26: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 27: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 28: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 29: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 30: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

UpsertRequest Received

Does Record Exist?Yes,

Update

Call Update

No,Create

Alternate Key Values?

No

Yes

Copy key values to Target Entity

Attributes

Update Pre Plug-In s

Update Post Plug-In s

Call Create

Create Pre Plug-In s

Create Post Plug-In s

Package Results in UpsertResponse

Return UpsertResponse

Page 31: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 32: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 33: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 34: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 35: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Call Assign

Assign Pre-Plug-Ins

Assign Business Logic

Update Pre-Plug-Ins

Call Update

Update

Update Post-Plug-Ins

Assign Post-Plug-Ins

Return

Call Update

Update Pre-Plug-Ins

Update

Update Post-Plug-Ins

Return

Page 36: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 37: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Client Server

Create Order()

Before

Create Order()

Create Order()

Database

BEGIN TRANS

INSERT ...

COMMIT TRANS

BEGIN TRANS

INSERT ...

COMMIT TRANS

BEGIN TRANS

INSERT ...

COMMIT TRANS

Client Server

ExecuteMultiple([1,2,3])

ExecuteMultiple

Database

BEGIN TRANS

INSERT ...

COMMIT TRANS

BEGIN TRANS

INSERT ...

COMMIT TRANS

BEGIN TRANS

INSERT ...

COMMIT TRANS

Client Server

ExecuteTransaction([1,2,3])

ExecuteTransaction

Database

BEGIN TRANS

INSERT ...

INSERT ...

INSERT ...

COMMIT TRANS

Page 38: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 39: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 40: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 41: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 42: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 43: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 44: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 45: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 46: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Server

Before

Client 1 Client 2

Retrieve Contact A

Retrieve Contact A

Update Contact A

Update Contact A

DATALOSS!

Server

After

Client 1 Client 2

Retrieve Contact A

Return Row Version 1

Retrieve Contact A

Return Row Version 1

Update Contact A V1

Update Contact A V1

Error: Concurrency Conflict

Update Row Version to V2

Page 47: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 48: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 49: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 50: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 51: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

• Quick Find uses the SQL LIKE

operator for text strings.

• “Starts with” search by default

• Many end user ’s provide wildcards to

search within the text.

• Doesn’t use an index and results

in poor performance

Page 52: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

• Turned Off by default. Must be

enabled in System Settings.

• Text based FIND columns use SQL

full-text indexes.

• Fields that contain ALL words in the

search text are returned.

First available in Vega

UR1 for On Prem only.

Page 53: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Test Org Stats ResultsMSIT SMB Sales Org (450GB)

Overall time with 43 tests across 4 different entities + MEQF:

• 40 minutes without FTS

• ~27 seconds with FTS

Entity Row Count

Activity 5.4M

Account 4.1M

Contact 5.2M

Lead 2.4M

Opportunity 3.1M

Search Term Non-FTS FTS

*alexandria 74s 0.067s

*12 noon 73s 0.5s

*beeping 73s 0.078s

*Windows

Server 2012

120s 2.5s

Significant performance gains

over wildcard based searches.

Page 54: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Search across multiple entities directly

from the navigation

Page 55: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Perform code free calculations and

actions with Calculated fields

Page 56: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

A calculated fields contain a value

calculated based on conditions and a

formula defined within that field

The conditions and formulas can refer to

the values of the other fields in the same

entity or values of the fields in the related

entities.

Page 57: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Record level aggregates computed from

related records

Page 58: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Rollup fields are used to capture key

business metrics at a record level from

related entities with 1:N relationships.

Rollup fields are calculated by a recurring

job, calculations are not in real time

Rollup Fields are calculated via scheduled

jobs (default every hour)

Page 59: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 60: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Page 61: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Out of Box Fields now supports Field

Level Security

Page 62: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

User and manager relationshipsBased on Manager

Direct report reporting structure

Enforces a strict tree structureSame Business Unit is enforced

Page 63: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 64: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Cross business unitNo constraints on business unit hierarchy

Structure based on Position and Parent Position records

Users tagged to a positionPositions can be used for multiple users

Reporting structureUser doesn’t have to be a manager of a user to access data

Page 65: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 66: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Display customized help to the users

Page 67: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)

Unmanaged Solution

• Container of customizations that exist on top of the system and other managed solutions

• An “Open” solution Allows direct customizations to components of

CRM

Contains references to customization and components but does not “own” them.

Does not delete or remove components if the solution is deleted.

Managed Solution

• A “finished” unmanaged solution that has been exported as managed.

• Managed solutions are “locked” The Identity of the solution cannot be modified

Components cannot be removed or added to it.

Exists in its own layer and merges with other layers and the system layers to represent a view to the user.

Can be uninstalled ( Deleted ) from the system.

Page 68: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 69: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)
Page 70: Microsoft Dynamics xRM Technical Brief - Gov Share · Gilad Levy, Senior Consultant MCS Microsoft Dynamics Technical Brief Relationship & Interaction Management Platform (xRM)