Technical Deep Dive on Dynamics 365 Customer...

39
1 Technical Deep Dive on Dynamics 365 Customer Engagement Performance Optimization Nov. 22 nd, 2017

Transcript of Technical Deep Dive on Dynamics 365 Customer...

Page 1: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

1

Technical Deep Dive on Dynamics 365 Customer Engagement Performance Optimization

Nov. 22nd, 2017

Page 2: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

2

On today‘s call

RADU NEGULESCUSIMONE ASTOLFI

Page 3: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

3

• Optimizing the Application

• Network

• Troubleshooting

• Troubleshooting Tools

• Q&A

Agenda

Page 4: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

4

Causes of Performance Issues

Application

Users and business process

Application configuration

Application coding

Database

Database index and table

design

SQL Server configurations

Infrastructure

Operating System

Hardware

Datacenter Network

Customer Network

Application

Users and business process

Application configuration

Application coding

Database

Database index and table

design

SQL Server configurations

Infrastructure

Operating System

Hardware

Datacenter Network

Customer Network

Application

Slow Form Loads

Saving Records

Slow List View Loading

Database

Slow Workflow Processing

Slow Searching

Timeouts and Deadlocks

InfrastructureSlow Logins

Timeouts

Effects of Performance Issues

Page 5: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

5

Optimizing the Application

Page 6: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

6

Client Machines

• Meet/Exceed Hardware and Software Requirements

• Power Settings

High Performance

• Non-essential applications

Turn off or Disable

• VDI/Citrix Scenarios

• Antivirus Programs / ScriptScanning

Add Dynamics site to list of safe sites

Web Client requirements

Supported Web Browsers and Mobile

Devices

Page 7: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

7

Internet Explorer

• IE Zoom - set to 100%

• New versions of stored pages - Automatic

• Disk Space to use - 250 MB

• Delete Browsing on Exit – Unmarked

• Do not save encrypted pages to disk -

Unmarked

Page 8: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

8

System Settings

• IM Presence

• Learning Path

• Activity Feeds

• Legacy Form Rendering

• Enable Quick Find record limits

• Audit Only What You Need

Page 9: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

9

Security Roles

• Organization• Parent-Child Business Unit

• Business Unit

• User

• None

Page 10: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

10

Sharing Considerations

• Limit Sharing of records

• Use security roles and

business units to grant

access to records

• Direct vs Indirect Shares

• Access Teams

If sharing is needed use Access Teams

if possible versus direct shares

Scalable Security Modeling

Page 11: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

11

Cascading Considerations

Default Cascading rules are setup to cascade

If you are deleting an account and the account has

hundreds of activities and has contacts with hundreds of

activates and opportunities with activities the delete

cascades through all those records.

Page 12: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

12

View Customizations

Page 13: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

13

Form Customizations

Role-based Forms

Use to limit what loads on a form

Form Controls - Remove if not needed

Quick View Forms

Bing Maps

Timer Controls

Charts

Social Pane

IFrames & Web Resources

Page 14: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

14

Demo

Page 15: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

15

Developer Tips

Best practices for developing with

Microsoft Dynamics 365

Page 16: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

16

Reporting

Microsoft Dynamics 365 (online) reporting

considerations

• Complexity of Report and

number of charts in a

dashboard

• 50,000 record limit with charts

• Reports can span more the

50,000 records, however must

complete within 5 minutes or

will timeout

• Limit the fields pulled in the

query

Page 17: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

17

Network

Page 18: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

18

Bandwidth and Latency

• Average latency less than 150 ms.

• Max Download Speed greater than

50 KB/sec

Diagnostic Page

(https://<orgurl>.crm.dynamics.com/tools/

diagnostics/diag.aspx)

Page 19: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

19

Troubleshooting

Page 20: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

20

Questions to Ask

Does this impact certain users or is this issue

reproducible by all users?

If only a subset of users are impacted, perhaps it is something

isolated to a certain office branch, Security Role or local

machine configuration.

Page 21: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

21

Questions to Ask

What entities/area does this issue happen with?If the issue is on certain forms, certain sections or areas of the

application, it potentially is related to customizations. The

amount of customizations, number of subgrids loading or client

side code executing slowly.

Page 22: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

22

Questions to Ask

If the issue happens with only certain entities, investigation can

focus on items interacting with this specific entity. If all entities

are impacted, we can look at more general SQL issues,

Network and client side for troubleshooting.

What form(s) does the issue happen with?

Page 23: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

23

Questions to Ask

What browser is being used?

If the issue only reproduces in a specific browser, look for add-

ins for the affected browser to see if they may be causing

additional processing. If users are reporting the same behavior

with the same browser, have them try from a new machine or

machine off company network and policies (such as a home

computer) and see if the issue still reproduces. If the issue

does not happen on a home computer, this could mean the

issue related to the Group Policy / configuration of machine on

the company network.

Page 24: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

24

Legacy Forms

Check and see if Legacy Form

rendering engine is being used.

This can be done with the customer by

having them check Settings ->

Administration -> System Settings ->

General tab

Page 25: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

25

Plugins

Check and see if they have any

plugins executing on the entity

in question

Log into the instance and check if they have any plugins

registered on that entity, specifically regarding 'Retrieve'

message. This can be done by navigating to Settings ->

Settings -> Customizations -> Customize the System -> Sdk

Message Processing Steps.

You can ignore the ActivityFeeds plugins typically as these are

out of the box plugins. We are looking for entries which match

the following:

- SDK Message = Retrieve (Possibly other SDK Message types

as well, such as RetrieveMultiple)

- Primary Object Type Code = <matches entity issue

happening on>

- Status = Enabled

- Execution Mode= Synchronous

SDK Message Processing Steps matching these results could

be investigated as they would be executing when the record is

loaded. These steps could be potentially disabled and the

scenario can be retested without these enabled to see if the

issue remains.

Page 26: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

26

On Load Events

Under Form Customizations,

check for OnLoad events

Navigate to Settings -> Customizations -> Customize the

System -> Entities -> <repro entity> -> Forms -> <repro

form>. Then navigate to Form Properties -> Events tab.

Are there libraries listed under Form Libraries? If there is, these

are the libraries or the definitions of the client side scripting.

Under Event Handlers, Event: OnLoad, are there libraries listed

here? Are they enabled? Should there be an OnLoad listed

here, this means when the page is loaded, it runs the

function(s) listed below.

If there are OnLoads listed and enabled, try disabling them,

save and publish the forms. Then attempt to reproduce the

issue.

Page 27: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

27

Express Route

Microsoft Dynamics 365 and ExpressRoute

Not routing customer information

via the public internet

Dedicated connection avoiding

conflict with other internal traffic

Page 28: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

28

Troubleshooting Tools

Page 29: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

29

Azure Speed Test

Run AzureSpeed test to determine

client latency to Azure datacenters.

From web browser, access

http://www.azurespeed.com/

This is an approximate calculation of latency to Azure

data centers from the client machine. The data centers

we would want to be mindful of are:

- North America, West US, California

- North America, East US 2, Virginia

Same recommendations here as the CRM Diagnostic

Page. This is not a definitive CRM test but more of a

general network performance indicator.

Page 30: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

30

Fiddler

Capture a Fiddler Trace while

trying to load the form. For

additional instructions, see the

Fiddler documentation for details

on using Fiddler or utility Website:

http://fiddler2.com

Take a look at ClientBeginRequest, ClientDoneRequest,

ServerGotRequest, ServerBeginReponse and

ServerDoneReponse. Look for long delays here

between the markers. Long delays would be over a

couple of seconds.

If delays are between ServerGotRequest and

ServerBeginReponse, this indicates the server was

processing on retrieving or processing the data before

sending back to the client. Look towards SQL or Plugin

execution delays.

If the delay is ClientBeginRequest, ClientDoneRequest or

ServerGotRequest, this indicates slow network in

sending the request to the server. Look at network

latency, bandwidth and perhaps firewalls on the

customer side.

Page 31: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

31

Form Performance Test

If the form does load, run Forms

Performance report when

reproducing issue. (alt+shift+q)

There will be 4 larger markers (All Subgrid

Load, Complete Load, Edit-Ready (pre-

onload), Edit-Ready (post-onload) and then

a bunch of smaller ones. Values are in

milliseconds (ms). The main 4 should

complete between 2400 - 7000 typically.

Page 32: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

32

Collecting Client Side Performance Metrics

1. Login to your CRM organization in browser. Navigate to any entity grid or form.

2. Press Alt + Shift + Q.

3. In the Performance view that this opens, click "Enable" to turn on capture of performance measurements.

4. Click "Close" to close the Performance view.

5. If you are measuring form load time, navigate to the grid for the entity you want to measure.

6. Open a record. Let it load fully.

7. Press Alt + Shift + Q to bring up the Performance view.

8. Click on "Select Major" to get a list of the main measurements.

9. For Dynamics CRM 2015 Spring release, for the new forms, the 2 main measurements are:

a."ControlsInitializationCompleteTimestamp" : all controls on the form are initialized and record is edit

ready. Asynchronous loads may not be completed yet.

b."All Sub-grids Loaded": All sub-grids are loaded with the

associated records. All asynchronous loads are complete.

Page 33: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

33

Collecting Network Traces from the Browser

1. Identify the scenario (page) which is loading slowly. Preferably this should be a warm scenario (i.e. page

navigated the second time and cache warmed up)

2. Use IE 11 network analyzer to record a trace:

a. Show the network analyzer by pressing F12 then clicking on the network icon then start tracing by

clicking on the green play button.

b. Execute the test scenario.

c. Stop recording by clicking on the red stop button

d.Save to xml file by clicking the button next to it

3.Use Chrome network analyzer to record a trace:

a. Open network analyzer by pressing F12 and then clicking on Network. Unlike IE Chrome records by

default.

b. Execute the test scenario

c. Stop recording by clicking on the red record button

d. Right click on the grid and choose “Save as HAR with content”

Page 35: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

Introduction to Dynamics 365 CUSTOMER ENGAGEMENT Technical Onboarding (Day 1)

Recording from November 6th, 2017

Introduction to Dynamics 365 CUSTOMER ENGAGEMENT Technical Onboarding (Day 2)

Recording from November 7th, 2017

What's New and Highlights in Business Applications

Recording from November 8th, 2017

Introduction to Microsoft Dynamics 365 - Internal Use Rights & Demo Benefits

Recording from November 8th, 2017

Introduction to Dynamics 365 CUSTOMER ENGAGEMENT - Basics of Customization

Recording from November 9th, 2017

Attend this Technical Journey if you are new to Microsoft Dynamics 365.

Components:

• 4 technical training Webcasts (free of charge)

• One-to-one Starter Kit Consultation*

Target audience:

• IT Decision Maker

• Tech Influencing Business Developer Manager

• Productivity Consultants

• Sales Solutions Specialist

• PreSales Specialist

• Consultant

Technical Level:

• 100-200 (Introduction + Technical Details)

Prerequisites:

• You have to be a Microsoft Partner

• Experience with Office 365 is an advantage

Technical JourneyIntroduction to Dynamics 365

Customer Engagement

Dynamics 365 Starter Kit Consultation

Delivery method: on-demand*

*The cost for this technical consultation

is 5 partner advisory hours.

GET STARTEDStart here if you are new to

Microsoft Dynamics 365

Page 36: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

Enhance Your Business with Dynamics 365 for Field Service

Recording from November 14th, 2017

Enhance Your Business with Dynamics 365 and Azure B2B Functionality

Recording from November 14th, 2017

Enhance Your Business with Dynamics 365 Portals

Recording from November 14th, 2017

Enhance Your Business with Dynamics 365 for Project Service Automation and Project Online

Recording from November 15th, 2017

Enhance your business with Dynamics 365 - PowerApps and Flow

Recording from November 15th, 2017

Enhance Your Business with Dynamics 365 with Cognitive Services / Cortana Intelligence

Recording from November 16th, 2017

Enhance Your Business with Dynamics 365 and Data analysis / Insights / Power BI

Recording from November 16th, 2017

Attend to this Technical Journey if you already have experience with any Dynamics 365 Application and wish to enhance your business portfolio with new services.

Components:

• 7 technical training Webcasts (free of charge)

• One-to-one Growth Consultation

Target audience:

• Architect

• IT Decision Maker

• Tech Influencing BDM

Technical Level:

• 200 (Technical Details)

Prerequisites:

• Basic know-how of Dynamics 365 Customer

Engagement functionalities.

Technical JourneyEnhance Your Business with

Dynamics 365 Customer Engagement

GROW

Dynamics 365 Growth Kit Consultation

Delivery method: on-demand

*The cost for this technical consultation

is 5 partner advisory hours.

Page 37: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

Technical Deep Dive on Dynamics 365 with Azure AD - Managing Multiple Customers

Recording from October 10th, 2017

Technical Deep Dive on Dynamics 365 for Field Service

Recording from November 21st, 2017

Technical Deep Dive on Dynamics 365 with PowerApps

Recording from November 21st, 2017

Technical Deep Dive on Dynamics 365 CUSTOMER ENGAGEMENT performance optimization

Delivery date: November 23rd, 2017, 09:00 - 10:00, GMT (London)

Technical Deep Dive on Dynamics 365 with Azure Logic Apps

Delivery date: November 23rd, 2017, 10:30 - 11:30, GMT (London)

Attend this Technical Journey if you wish to have a technical deep dive into specific functionalities of the listed Microsoft Dynamics 365 Applications.

Components:

• 5 technical training Webcasts (free of charge)

• One-to-one Growth Consultation*

Target audience:

• Architects

• Consultants

Technical Level:

• 300-400 (Functional/Technical Deep Dive)

Prerequisites:

• Solid know-how of Dynamics 365 Customer

Engagement functionalities

• Developer skills required for Level 400 sessions

Technical JourneyTechnical Deep Dive on Dynamics 365

Customer Engagement

OPTIMIZE

Dynamics 365 Advanced Workload Consultation

Delivery method: on-demand*

*The cost for this technical consultation

is 5 partner advisory hours.

Page 38: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

38

Questions

Wishes

Feedback

[email protected]

Page 39: Technical Deep Dive on Dynamics 365 Customer ...files-eu.clickdimensions.com/orbisde-agt2u/files/...Technical Deep Dive on Dynamics 365 with PowerApps Recording from November 21 st

39

© 2017 Microsoft Corporation. All rights reserved. Microsoft, Microsoft Dynamics, and the Microsoft Dynamics logo are trademarks of the Microsoft group of companies. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this

presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.