Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 13977

Microsoft Dynamics CRM 2015 | Update 1– Lessons Learned Part II

$
0
0

Lessons_LearnedNachdem ich im 1. Teil bereits auf einige Punkte eingegangen bin, folgt heute nach weiteren Projekten ein weiterer Teil. Microsoft versendet seit kurzem Benachrichtigungen über Update 1 an die Systemadministratoren mit dem Hinweis, dass vorab der Planung des Updates auf Update 1 noch einige Tests in der Umgebung getätigt werden sollten, um sich am Update 1 auch entsprechend erfreuen zu können. In der E-Mail wird unter anderem auf das Customer Code Validation Tool verwiesen, mit dem ihr eure Anpassungen testen könnt. Aus der Praxis heraus hier nun ein paar Tipps:

Verwendung von jQuery.noConflict()– Leider erkennt das aktuelle CCV Tool die Verwendung von jQuery nicht optimal und gibt daher keinen entsprechenden Hinweis aus, den es bei der Verwendung von jQuery zu beachten gilt:

With Microsoft Dynamics CRM Online 2015 Update 1, form scripts run in a different scope than the jQuery instance used by the application. This means that there may not be an instance of jQuery available when your code attempts to use jQuery.noConflict. If you must use jQuery, you should first detect whether an instance of jQuery exists before you attempt to use jQuery.noConflict.

Verwendung der IE Developer Tools– Ihr nutzt die IE Developer Tools, um JavaScript Code mit Hilfe der Konsole zu debuggen? Dann solltet Ihr folgenden Hinweis beachten, um nicht überrascht zu sein, wenn euer Quellcode sich bei der Ausführung anders verhält, als bei der direkten Ausführung über die Konsole:

CRM forms are composed of several frames, for the code to work in the console you must select the right frame. For CRM Online 2015 Update 1 forms, select the frame named ClientApiWrapper.aspx. For earlier releases use the frame named main.aspx.

Verwendung von SDK.SOAP Library  oder anderen abhängigen Scripten, die in unterschiedlichen Bibliotheken vorgehalten werden – Das CCV Tool erkennt leider auch keine Script-Abhängigkeiten bzw. kann diese analysieren. Normalerweise fügt man alle Script-Bibliotheken der jeweiligen Form hinzu und verlässt sich bei der Initialisierung auf die Reihenfolge, in der man die Scripte der Form hinzugefügt hat. Mit der neuen Form Rendering Engine jedoch, gibt es auf die Lade-Reihenfolge keinen Verlass mehr:

As a performance optimization, Microsoft Dynamics CRM forms load JavaScript web resources asynchronously and in parallel. This means that the order in which the libraries are configured for a form does not guarantee that a library will be fully downloaded and initialized before another library might attempt to use one of the objects defined in it.

If you have code that depends on another library to be fully downloaded and initialized, the most straightforward approach is to combine both libraries within a single JavaScript web resource with your code below the library code. A more sophisticated approach is to use libraries such as head.js or require.js to control how the separate libraries are loaded.

Diese Tipps helfen euch, eure Scripte noch besser zu analysieren, denn das CCV Tool würde ich eher als grob-motorisches Werkzeug beschreiben. Den tatsächlichen “Beweis”, ob sich euer Script immer noch wie gewünscht verhält, erhaltet Ihr nur mit einem Test – z.B. durch die neue Sandbox Funktion.

Bis zum nächsten Tipp…


Einsortiert unter:CRM 2015, CRM 2015 Online

Viewing all articles
Browse latest Browse all 13977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>