cub-e.net

just coding...

Dynamics 365 Community Event in Dubai on 9th and 10th February 2018

Dynamics 365 Saturday is a free Technical & Strategy Event Organised by the Microsoft Dynamics Community MVP’s For CRM and ERP professionals, technical consultants & developers. Learn & share new skills whilst promoting best practices, helping organisations overcome the challenges of implementing a successful digital transformation strategy with Microsoft Dynamics 365.

Dynamics 365 Saturday will replace CRM Saturday to provide a single platform to serve the whole Dynamics 365 community, the core customer experience values and ethics of CRM Saturday will continue to live on through 365 Saturday with the rest of the Dynamics Community.

I have a session in this event on 10th February. Session name is “Dynamics 365 V9 New Features & Deprecations” in Microsoft Dubai Office in Media City between 13:00 and 14:00. Also I will share my knowledge on Dynamics 365 in Hackathon on 11th February.

My session focuses on who interested in taking the plunge to “code”. The session will be covering all development structure. Attendees can easily see the difference between versions from a development perspective and will be particularly helpful for those who work on upgrade projects.

For more information and program agenda please visit : http://mwns.co/dj18 

We would like to see you there.

Dynamics 365 UK Community Event in London on 26th-27th January 2018

Dynamics 365 Saturday is a free Technical & Strategy Event Organised by the Microsoft Dynamics Community MVP’s For CRM and ERP professionals, technical consultants & developers. Learn & share new skills whilst promoting best practices, helping organisations overcome the challenges of implementing a successful digital transformation strategy with Microsoft Dynamics 365.

Dynamics 365 Saturday will replace CRM Saturday to provide a single platform to serve the whole Dynamics 365 community, the core customer experience values and ethics of CRM Saturday will continue to live on through 365 Saturday with the rest of the Dynamics Community.

I and Ramon Tebar (Investec CRM Solution Architect) will share their knowledge on Dynamics 365 in Hackathon on 26th January also they have a session in this event on 27th January. Session name is “Dynamics 365 V9 New Features & Deprecations” in Theatre 1 between 10:00 and 11:00.

Their session focuses on who interested in taking the plunge to “code”. The session will be covering all development structure. Attendees can easily see the difference between versions from a development perspective and will be particularly helpful for those who work on upgrade projects.

Microsoft Dynamics 365 Yeni Versiyon Tanıtımı

Dynamics 365 July Update yepyeni özellikleriyle birlikte geliyor. Bu versiyon ile Dynamics ürün ailesinden aldığımız verimlilik en üst düzeye çıkmakta ve gün geçtikçe Machine Learning ile daha fazla entegre olmakta. Bu versiyon geçmiştekilerle kıyaslanınca daha kullanıcı dostu ve Virtual Entities, MS Flow gibi özellikleriyle daha yetenekli.

17 Ekim 2017 tarihinde Microsoft Business Solutions MVP Barış Kanlıca  tarafından yapılacak bu webcast’te yeni özellikleri birlikte inceleyelim sorularınızı cevaplayalım.

Modüller: Dynamics 365 for Sales, Dynamics 365 for Customer Insights, Dynamics 365 for Customer Service

Yeni Özellikler: User Interface, Unified Client Interface and Apps,  Activity Timeline,  Virtual Entities, Multi-Select Option Sets, Business Process Flow Enhancements, Customer Insights, Organisation Insights, New Virtual Designers,

DirectionsEMEA 2017 Madrid – Development on Dynamics 365 CRM

Directions EMEA is an independent conference for Microsoft Dynamics partners from the ERP and CRM channels focusing on the SMB market. It is organized by partners for partners. The conference is where Microsoft Dynamics Partners go to learn first-hand from Microsoft about the Microsoft Dynamics Roadmap and new features of the latest Dynamics NAV version (Tenerife). Following the concept of integrating CRM and ERP within Dynamics 365, Directions EMEA also offers a deep insight into Microsoft Dynamics 365 BE for Finance and Operations, Microsoft Dynamics 365 BE for Sales and Microsoft Dynamics 365 BE for Marketing, as well as ensures a comprehensive understanding of the Cloud Solution Provider program.

Directions EMEA brings together over 2000 developers, implementers, technical experts, sales, marketing and executive/owner representatives from Microsoft Dynamics Partners. For independent software vendors, the event is a unique opportunity to show their solutions to the largest Microsoft Dynamics Partner forum and demonstrate their readiness for Dynamics 365 BE as SaaS providers.

The Directions conference provides the Dynamics community with a forum for knowledge sharing, networking and discovering new opportunities for future growth and collaboration. It is a must-attend event where partners can enhance and build their networks to reach a broader SMB market, learn about the latest product developments and tools, as well as enrich their operational and technical knowledge.

Since 2008 Directions EMEA has grown year by year. In 2016, it attracted almost 1800 attendees from 580 companies as well as 60 sponsors. 2017 is the 10th annual conference and will take place in Madrid on October 4 – 6, 2017.

Our CEO Baris Kanlica has a session in this event on 6th October Friday in Venecia room. Session name is  “Dynamics 365 new development features and deprecations” and it is is focused on those new to CRM development or CRM administrators interested in taking the plunge to “code” customization. The session will be covering all development structure of the Dynamics platform since version 2011. Attendees can easily see the difference between versions from a development perspective and will be particularly helpful for those who work on upgrade projects.

See you there :)

https://mawens.co.uk/directionsemea-2017-madrid-development-on-dynamics-365-crm/

Improve Microsoft Dynamics 365/CRM service channel allocation performance

The OrganizationServiceProxy and DiscoveryServiceProxy service proxy classes provide the ability to establish a connection to and communicate with the available Microsoft Dynamics 365/CRM services. However, improper use of these API's can potentially reduce application performance. Therefore, if you understand when and how to effectively leverage these service client API's, available in the SDK, you can optimize communication traffic between your application the Dynamics 365/CRM server.

 

When you establish a Windows Communication Foundation (WCF) service channel by using one of the service endpoints, for example, the Organization.svc, your application must perform two additional, time-consuming operations: 1) metadata download from the endpoint and 2) user authentication. You can improve performance if your application performs these operations a minimum number of times for each application session. The OrganizationServiceProxy constructor shown below performs both of these operations, in addition to allocating a new service channel, every time a service proxy object is created.

 

Violation Example

new OrganizationServiceProxy(new Uri(this.orgServiceUrl), nullthis.Credentials, null)

A first step towards improving performance is to minimize the number of times your application uses this constructor to create an instance of the service proxy.  If possible, use this constructor only one time during the application session and cache the returned reference for use in different code paths within your application. Notice that the returned service reference is not thread safe so multi-threaded applications will need to allocate one instance per thread. Applications must also call Dispose on the service proxy object before they terminate in order to free service channel allocated resources.

 

The service proxy class performs the two previously mentioned operations, metadata download and user authentication, by using the following public methods available as client API's.

 

Guideline Example

IServiceManagement<IOrganizationService> sm = ServiceConfigurationFactory

        .CreateManagement<IOrganizationService>(new Uri(orgServiceUrl));

 

this.Credentials = sm.Authenticate(this.Credentials);

 

The CreateManagement method performs the metadata download while the Authenticate method authenticates the user. The returned objects from these methods are thread safe and can be statically cached by your application. 

 

As a more efficient alterntive, you can then use these objects to construct a service proxy object via one of the other constructor overloads (depending on the authentication scenario):

 

newOrganizationServiceProxy(sm, this.Credentials.ClientCredentials)

 

newOrganizationServiceProxy(sm, this.Credentials.SecurityTokenResponse)

These constructor overloads bypass the two aforementioned operations and use the referenced service management and authentication credentials passed as method arguments.  By caching the service management and authenticated credential objects, your application can more efficiently construct the service proxy objects and allocate multiple service channels as necessary over the lifetime of an application session without repeating the costly (and redundant) operations. 

 

If you enable early-bound types on OrganizationServiceProxy through one of the EnableProxyTypes methods, you must do the same on all service proxies that are created from the cached IServiceManagement object. If your application uses the metadata, we recommend that it caches the metadata that it retrieves and periodically calls the RetrieveTimestampRequest message to determine whether it must refresh the cache.

 

In addition, monitor your WCF security token (Token) and refresh it before it expires so that you do not lose the token and have to start over with authentication. To check the token, create a custom class that inherits from the OrganizationServiceProxy or DiscoveryServiceProxy class and that implements the business logic to check the token. Or wrap the proxy classes in a new class. Another technique is to explicitly check the token before each call to the web service. Example code that demonstrates these techniques can be found in the ManagedTokenDiscoveryServiceProxy, ManagedTokenOrganizationServiceProxy, and AutoRefreshSecurityToken classes in the Helper Code: ServerConnection Class topic.

 


Performance Best-Practices: 

http://msdn.microsoft.com/en-us/library/gg509027.aspx#Performance

ServiceConfigurationFactory.CreateManagement<TService>(Uri serviceUri)

http://msdn.microsoft.com/en-us/library/hh560440.aspx

IServiceManagement.Authenticate(AuthenticationCredentials authenticationCredentials)

http://msdn.microsoft.com/en-us/library/hh560432.aspx

Use Try and Finally on Disposable Resources

Why

Using a try/finally block ensures that resources are disposed even if an exception occurs. Not disposing resources properly leads to performance degradation over time. 

When

This is important guideline when working with disposable resources such as 

  • Database connections 
  • File handles 
  • Message queue handles 
  • Text reader, writer 
  • Binary reader, writer 
  • Crypto stream 
  • Symmetric, Asymmetric and Hash algorithms. 
  • Windows Identity, Windows Impersonation Context  
  • Timer, Wait Handle in case of threading 
  • Impersonation Context 
  • XML Reader 
  • XML Writer

How

The following code fragment demonstrates disposing resources in a finally block..

SqlConnection conn = new SqlConnection(...)

try

{

   conn.Open();

   ...

}

finally

{

   if(null != conn)

     conn.close();

}

If developing in C# you can use the 'using' keyword which will automatically dispose resources after their usage.

using(SqlConnection conn = new SqlConnection(...))

{

   conn.Open();   

   ....

}


Problem Example

A database connection is opened and used to access data. 

Unfortunately, if there is an exception other than SqlException or if the exception handling code itself throws an exception the database connection won't be closed. This failure to close database connections could cause the application to run out of database connection impacting application performance.

try

{

   conn.Open();

   // do something with the connection

   // some more processing

   // close the connection

   if(conn != null)

     conn.Close();

}

catch(SqlException ex)

{

   // do exception handling

   // close the connection

   if(conn != null)

     conn.Close();

}

Solution Example

A database connection is opened and used to access data. The finally block will be executed whether there is exception or not, ensuring that the database connection is closed. 

SqlConnection conn = new SqlConnection(...)

try

{

   conn.Open();

   // do something with the connection

   // some more processing

}

catch(SqlException ex)

{

   // do exception handling 

  

}

finally

{

   // close the connection

   if(conn != null)

     conn.Close();

}

 

 

Additional Resources

Related Items

CRM Saturday Oslo 2017

Please join us on the next CRM Saturday event in Oslo (Norway) on 26th August. My session is "D365 New Features & Deprecations"

Full details and registration can be found on the CRM Saturday website: http://mwns.co/cso2017

CRM Saturday is a Free CRM Technical & Strategy Event Organised by the Microsoft Dynamics Community MVP's For Dynamics 365 Professionals, Technical Consultants & Developers. Learn & share new Skills whilst Promoting the CRM Manifesto, helping organisations overcome the challenges of implementing a Successful CRM Strategy with Microsoft Dynamics.

This is a whole day event with a lot of speakers from all around the world. It is an advertising and recruitment free event, and we are setting up both a technical and a business/strategy track so there will be interesting session for everyone.