100% found this document useful (1 vote)
92 views

Dynamics 365 Best Practices

Ms Dynamics

Uploaded by

Asfar Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
92 views

Dynamics 365 Best Practices

Ms Dynamics

Uploaded by

Asfar Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Microsoft FastTrack

Partner Architect
Program
Performance optimization
and best practices
Jason du Plessis
Senior FastTrack Solution Architect
Session Purpose and Expectations

Prerequisites

Practical experience of participating in a Dynamics Practical experience of customizing, extending or


implementation developing for Dynamics 365 CE

Objectives

Aware of best practices when customizing and


Not a training course on product features
developing for Dynamics 365 CE

Understand the impact on performance when doing


Not exhaustive in terms of approaches
things the right way vs. otherwise.

Understand how to approach performance related


issues and troubleshoot
Good Performance = Good Business
Performance Targets

Dynamics 365 CE targeted


to be quicker for user Intuitive Think about business not
system

But that does not mean


that page response times
accelerated
Get job done quicker
Achieve
Deliver more effective
System is doing more, but result Outcome
doing it as quickly as
previously

But to user, achieve


outcomes quicker Less Jarring user out of flow of
jarring thinking costly
Design for Performance
• Understand the performance needs at every aspect of the implementation
• Customization and Configuration
• Client scripts
• Server extensions (Plugins, workflows, actions)
• Integration
• Security Modeling

• Understand how the system will perform once deployed and reaches maturity
with full usage

• Estimate the data and the load on the system


Performance optimization
Tips and Tricks
Performance Recommendations - Customization

• Try to use out of box functionality as much as possible

• Customize the system in such a way that the information required for the user
is placed in right.

• Use the product features creatively to help user perform their activities
quicker

• Follow best practices when customizing the system


Performance Recommendations - Customization

• Avoid OptionSet attributes in QuickFinds and Sort columns


Performance Recommendations - Customization

• Set Plugin Trace Logging to Exception Level or Off in Production Instances


Performance Recommendations - Customization

• Update Web Resource References to use Relative path

• Version hash is appended to web resources that allows it to be cached

• Related web resources such as JScript, images, and stylesheets should be referenced using a

relative path so the version hash from the parent can be inherited.
d

https://msdn.microsoft.com/en-us/library/gg309473.aspx
Performance Recommendations - SDK

• ColumnSet, NoLock and PageInfo options for QueryExpressions

* If RCSI is enabled, NoLock is not required. // ** false parameter for ColumnSet returns only record id
Performance Recommendations - SDK
• Batches requests in a single web service call method.
• Considered when network latency impacts performance
between client (SDK App) and server (Dynamics 365)
• Commonly used for Dynamics 365/IFD Deployments
• Not recommended for Dynamics 365 OnPrem with low network latency

ExecuteMultipleRequest
CreateRequest CreateRequest

CreateRequest CreateRequest

CreateRequest CreateRequest

CreateRequest CreateRequest
Performance Recommendations - Plugins
• Disable KeepAlive when calling webservices from Plugins
• Default value = true
• Allows clients to be aware of connections timeouts avoiding attempts to use expired
sessions.
Performance Recommendations - Plugins

• Avoid unnecessary plugin execution in a Update message


Performance Recommendations – Client script
• Avoid synchronous calls using Javascript
• Execute requests in asynchronous mode when using Ajax or XMLHTTP

https://msdn.microsoft.com/en-us/library/ms536648(v=vs.85).aspx
Performance Recommendations – Client script
• Use Web storage API to cache CRM data
• The following sample shows how to incorporate this concept into requesting/caching CRM
data. The sample uses sessionStorage because it has a shorter lifetime, but localStorage
could be used if this data is highly static in nature as that will persist across browser
sessions..
function UserHasRole(roleName) {
var datakey = "datakey_" + roleName;
if (typeof (Storage) !== "undefined") {
// Get the data from cache using user-specific cache key
var res = sessionStorage.getItem(datakey);
if (!res) {
//Check if user has role and cache results
var roleres = CheckRole(roleName);
sessionStorage.setItem(datakey, roleres);
return roleres;
} else {
//check cached value
return (res.indexOf("true") !== -1)
}
} else {
//Check Security role if browser does not support caching
return CheckRole(roleName);
}
}
Troubleshooting
Performance Issues
Everything is slow!!!
Performance is multi dimensional

Location Bandwidth

Wired, WiFi, 3G Latency

Operating
Cached objects
System

Customizations Antivirus

Browser Device

Time of Day Context Resolution


Track the issue down logically
Server-side

Server-side
Client-side
Performance Categories

Network &
Infrastructure Hardware Server

Web Client Mobile


Devices
Troubleshooting performance issues
• Performance is a relative term

• Understand the access pattern of the users

• Start from the user and work your way up in troubleshooting

• Use all the tools available at your disposal


• Fiddler
• Browser Developer Tools
• Network analyzers (e.g. ThousandEyes)
Troubleshooting performance issues – Network

• No “FEELING” when • Set performance expectations


troubleshooting perf issue. (including different geos
Must be “FACTS” performances) with customer
• Gather and document data • Analyze data to determine the
points from different locations next best action
Troubleshooting performance issues – Client - Fiddler

• Analyze the Request and


Response times

• Timeline view to get a quick


snapshot of where time is spent in
an end to end operation (e.g.
Form Load)

• Analyze network calls made from


web-resources or client scripts
Troubleshooting performance issues – Client using Browser
Debug
Troubleshooting performance issues – Client. Performance
Center (Alt+Shift+Q in UCi)
Troubleshooting performance issues – Server Side
Troubleshooting performance issues – Server Side

• Data retrieval – limit the data you retrieve i.e. number of columns and number
of rows
• Calling out to external systems – will incur a network cost that is much higher
than any other execution
• A simple plugin on an entity that is affected often could be more expensive than
complex plugin on an entity this updated once a day
• Consider your integrations – they typically do large volume transactions and
plugins could cause issues at scale
• Evaluate when to use plug-in and workflow
• Write plug-ins that execute faster 
• Identify plug-ins takes longer than 10 seconds to execute
• Plugins cascade – often one plugin can affect a record that executes another plugin etc.
• Identify the synchronous plug-ins, determine if it can be asynchronous. Move to Power
Automate
Questions
© Copyright Microsoft Corporation. All rights reserved.

You might also like