1Nov. 22nd, 2017Technical Deep Dive on Dynamics 365Customer Engagement PerformanceOptimization


3Agenda Optimizing the ApplicationNetworkTroubleshootingTroubleshooting ToolsQ&A

Causes of PerformanceIssuesEffects of PerformanceIssuesUsers and business processApplicationApplication configurationApplication codingDatabaseApplicationSQL Server configurationsSlow Workflow ProcessingDatabaseCustomer NetworkSlow SearchingTimeouts and DeadlocksHardwareDatacenter NetworkSaving RecordsSlow List View LoadingDatabase index and tabledesignOperating SystemInfrastructureSlow Form LoadsInfrastructureSlow LoginsTimeouts4

5Optimizing the Application

6Client Machines Meet/Exceed Hardware and Software RequirementsWeb Client requirements Power SettingsHigh PerformanceSupported Web Browsers and MobileDevices Non-essential applicationsTurn off or Disable VDI/Citrix Scenarios Antivirus Programs / ScriptScanningAdd Dynamics site to list of safe sites

7Internet 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

8System Settings IM Presence Learning Path Activity Feeds Legacy Form Rendering Enable Quick Find record limits Audit Only What You Need

9Security Roles OrganizationParent-Child Business UnitBusiness UnitUserNone

10Sharing Considerations Limit Sharing of records Use security roles andbusiness units to grantaccess to records Direct vs Indirect Shares Access TeamsIf sharing is needed use Access Teamsif possible versus direct sharesScalable Security Modeling

11Cascading ConsiderationsDefault Cascading rules are setup to cascadeIf you are deleting an account and the account hashundreds of activities and has contacts with hundreds ofactivates and opportunities with activities the deletecascades through all those records.

View Customizations12

13Form CustomizationsRole-based FormsUse to limit what loads on a formForm Controls - Remove if not neededQuick View FormsBing MapsTimer ControlsChartsSocial PaneIFrames & Web Resources


15Developer TipsBest practices for developing withMicrosoft Dynamics 365

16Reporting Complexity of Report andnumber of charts in adashboard 50,000 record limit with charts Reports can span more the50,000 records, however mustcomplete within 5 minutes orwill timeout Limit the fields pulled in thequeryMicrosoft Dynamics 365 (online) reportingconsiderations


18Bandwidth and Latency Average latency less than 150 ms. Max Download Speed greater than50 KB/secDiagnostic Page(https:// orgurl


20Questions to AskDoes this impact certain users or is this issuereproducible by all users?If only a subset of users are impacted, perhaps it is somethingisolated to a certain office branch, Security Role or localmachine configuration.

Questions to AskWhat entities/area does this issue happen with?21If the issue is on certain forms, certain sections or areas of theapplication, it potentially is related to customizations. Theamount of customizations, number of subgrids loading or clientside code executing slowly.

22Questions to AskWhat form(s) does the issue happen with?If the issue happens with only certain entities, investigation canfocus on items interacting with this specific entity. If all entitiesare impacted, we can look at more general SQL issues,Network and client side for troubleshooting.

23Questions to AskWhat browser is being used?If the issue only reproduces in a specific browser, look for addins for the affected browser to see if they may be causingadditional processing. If users are reporting the same behaviorwith the same browser, have them try from a new machine ormachine off company network and policies (such as a homecomputer) and see if the issue still reproduces. If the issuedoes not happen on a home computer, this could mean theissue related to the Group Policy / configuration of machine onthe company network.

24Legacy FormsCheck and see if Legacy Formrendering engine is being used.This can be done with the customer byhaving them check Settings - Administration - System Settings - General tab

PluginsCheck and see if they have anyplugins executing on the entityin question25Log into the instance and check if they have any pluginsregistered on that entity, specifically regarding 'Retrieve'message. This can be done by navigating to Settings - Settings - Customizations - Customize the System - SdkMessage Processing Steps.You can ignore the ActivityFeeds plugins typically as these areout of the box plugins. We are looking for entries which matchthe following:- SDK Message Retrieve (Possibly other SDK Message typesas well, such as RetrieveMultiple)- Primary Object Type Code matches entity issuehappening on - Status Enabled- Execution Mode SynchronousSDK Message Processing Steps matching these results couldbe investigated as they would be executing when the record isloaded. These steps could be potentially disabled and thescenario can be retested without these enabled to see if theissue remains.

26On Load EventsNavigate to Settings - Customizations - Customize theSystem - Entities - repro entity - Forms - reproform . Then navigate to Form Properties - Events tab.Under Form Customizations,check for OnLoad eventsAre there libraries listed under Form Libraries? If there is, theseare the libraries or the definitions of the client side scripting.Under Event Handlers, Event: OnLoad, are there libraries listedhere? Are they enabled? Should there be an OnLoad listedhere, this means when the page is loaded, it runs thefunction(s) listed below.If there are OnLoads listed and enabled, try disabling them,save and publish the forms. Then attempt to reproduce theissue.

27Express RouteNot routing customer informationvia the public internetDedicated connection avoidingconflict with other internal trafficMicrosoft Dynamics 365 and ExpressRoute

28Troubleshooting Tools

29Azure Speed TestRun AzureSpeed test to determineclient latency to Azure datacenters.From web browser, access is an approximate calculation of latency to Azuredata centers from the client machine. The data centerswe would want to be mindful of are:- North America, West US, California- North America, East US 2, VirginiaSame recommendations here as the CRM DiagnosticPage. This is not a definitive CRM test but more of ageneral network performance indicator.

FiddlerCapture a Fiddler Trace whiletrying to load the form. Foradditional instructions, see theFiddler documentation for detailson using Fiddler or utility Website:http://fiddler2.com30Take a look at ClientBeginRequest, ClientDoneRequest,ServerGotRequest, ServerBeginReponse andServerDoneReponse. Look for long delays herebetween the markers. Long delays would be over acouple of seconds.If delays are between ServerGotRequest andServerBeginReponse, this indicates the server wasprocessing on retrieving or processing the data beforesending back to the client. Look towards SQL or Pluginexecution delays.If the delay is ClientBeginRequest, ClientDoneRequest orServerGotRequest, this indicates slow network insending the request to the server. Look at networklatency, bandwidth and perhaps firewalls on thecustomer side.

31Form Performance TestIf the form does load, run FormsPerformance report whenreproducing issue. (alt shift q)There will be 4 larger markers (All SubgridLoad, Complete Load, Edit-Ready (preonload), Edit-Ready (post-onload) and thena bunch of smaller ones. Values are inmilliseconds (ms). The main 4 shouldcomplete between 2400 - 7000 typically.

32Collecting Client Side Performance Metrics1. 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 editready. Asynchronous loads may not be completed yet.b."All Sub-grids Loaded": All sub-grids are loaded with theassociated records. All asynchronous loads are complete.

33Collecting Network Traces from the Browser1.Identify the scenario (page) which is loading slowly. Preferably this should be a warm scenario (i.e. pagenavigated 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 byclicking on the green play button.b. Execute the test scenario.c. Stop recording by clicking on the red stop buttond.Save to xml file by clicking the button next to it3.Use Chrome network analyzer to record a trace:a. Open network analyzer by pressing F12 and then clicking on Network. Unlike IE Chrome records bydefault.b. Execute the test scenarioc. Stop recording by clicking on the red record buttond. Right click on the grid and choose “Save as HAR with content”

Additional Resources Optimize form performance Retrieve Multiple Performance Older “Tips & Tricks” from the field: Microsoft CRM Online Performance Tips & Tricks - Part 1 Microsoft CRM Online Performance Tips & Tricks - Part 2 Key preparation and configuration tasks34

Technical JourneyIntroduction to Dynamics 365Customer EngagementAttend this Technical Journey if you are new toMicrosoft Dynamics 365.Components: 4 technical training Webcasts (free of charge)GET STARTEDStart here if you are new toMicrosoft Dynamics 365Introduction to Dynamics 365 CUSTOMER ENGAGEMENT Technical Onboarding (Day 1)Recording from November 6th, 2017Introduction to Dynamics 365 CUSTOMER ENGAGEMENT Technical Onboarding (Day 2)Recording from November 7th, 2017 One-to-one Starter Kit Consultation*Target audience: IT Decision MakerWhat's New and Highlights in Business ApplicationsRecording from November 8th, 2017 Tech Influencing Business Developer Manager Productivity Consultants Sales Solutions SpecialistIntroduction to Microsoft Dynamics 365 - Internal Use Rights & Demo BenefitsRecording from November 8th, 2017 PreSales Specialist ConsultantIntroduction to Dynamics 365 CUSTOMER ENGAGEMENT - Basics of CustomizationRecording from November 9th, 2017Technical Level: 100-200 (Introduction Technical Details)Prerequisites: You have to be a Microsoft Partner Experience with Office 365 is an advantageDynamics 365 Starter Kit ConsultationDelivery method: on-demand**The cost for this technical consultationis 5 partner advisory hours.

Technical JourneyEnhance Your Business withDynamics 365 Customer EngagementAttend to this Technical Journey if you alreadyhave experience with any Dynamics 365Application and wish to enhance your businessportfolio with new services.GROWEnhance Your Business with Dynamics 365 for Field ServiceRecording from November 14th, 2017Enhance Your Business with Dynamics 365 and Azure B2B FunctionalityRecording from November 14th, 2017Enhance Your Business with Dynamics 365 PortalsRecording from November 14th, 2017Components: 7 technical training Webcasts (free of charge) One-to-one Growth ConsultationEnhance Your Business with Dynamics 365 for Project Service Automation and Project OnlineRecording from November 15th, 2017Target audience: Architect IT Decision MakerEnhance your business with Dynamics 365 - PowerApps and FlowRecording from November 15th, 2017 Tech Influencing BDMTechnical Level:Enhance Your Business with Dynamics 365 with Cognitive Services / Cortana IntelligenceRecording from November 16th, 2017 200 (Technical Details)Prerequisites: Basic know-how of Dynamics 365 CustomerEngagement functionalities.Enhance Your Business with Dynamics 365 and Data analysis / Insights / Power BIRecording from November 16th, 2017Dynamics 365 Growth Kit ConsultationDelivery method: on-demand*The cost for this technical consultationis 5 partner advisory hours.

OPTIMIZETechnical JourneyTechnical Deep Dive on Dynamics 365Customer EngagementTechnical Deep Dive on Dynamics 365 with Azure AD - Managing Multiple CustomersRecording from October 10th, 2017Attend this Technical Journey if you wish to have atechnical deep dive into specific functionalities ofthe listed Microsoft Dynamics 365 Applications.Technical Deep Dive on Dynamics 365 for Field ServiceRecording from November 21st, 2017Components: 5 technical training Webcasts (free of charge) One-to-one Growth Consultation*Target audience: Architects ConsultantsTechnical Level: 300-400 (Functional/Technical Deep Dive)Prerequisites: Solid know-how of Dynamics 365 CustomerEngagement functionalities Developer skills required for Level 400 sessionsTechnical Deep Dive on Dynamics 365 with PowerAppsRecording from November 21st, 2017Technical Deep Dive on Dynamics 365 CUSTOMER ENGAGEMENT performance optimizationDelivery date: November 23rd, 2017, 09:00 - 10:00, GMT (London)Technical Deep Dive on Dynamics 365 with Azure Logic AppsDelivery date: November 23rd, 2017, 10:30 - 11:30, GMT (London)Dynamics 365 Advanced Workload ConsultationDelivery method: on-demand**The cost for this technical consultationis 5 partner advisory hours.

[email protected]

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 thispresentation. 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.

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 .