Personalized Community is here!
Quickly customize your community to find the content you seek.
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 Release Wave 2Discover the latest updates and new features to Dynamics 365 planned through March 2021.
Release overview guides and videos Release Plan | Preview 2020 Release Wave 2 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
on the Contact Form, I sometimes get the following error when leaving/reloading it:
Microsoft Dynamics CRM Error Report Contents
<Message>Uncaught TypeError: Cannot read property 'length' of undefined</Message>
<BrowserUserAgent>Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36</BrowserUserAgent>
This happens quite a lot to me. Is this a CRM bug or is some of my custom code causing a problem here?
Are you using jquery in your web resource file? if so it might be from script
yes, I am using jquery 2.1.1 wrapped in my own namespace to avoid conflicts with the CRMs jquery in the following way:
var isConflictedEnvironment = typeof $ !== 'undefined';
// jquery 2.1.1 source code
tv.$ = jQuery.noConflict(true);
So my jQuery instance lives within the "tv" namespace and should not conflict with the global $ alias used by the CRM. Do you think that's causing the error within jquery 1.7.2 used by the CRM?
the error is not in jquery. Some where in your script you are trying to get length of the object using jquery or trying apply some operation but object is null. check null value before applying any operation on the object in your script
The error is saying that the variable is null and you can't get the length of a null variable.
You need to do a null check before using the length value
So, by accident I stumbled over the real culprit here: I am also using jQuery UI 1.11.2 in some of my scripts which is designed to work with jQuery 2. Sometimes, jQuery UI was loaded before my jQuery instance was initialized in tv.$ and then UI just used jQuery 1.7.2 provided by the CRM. This caused some error inside the CRMs jQuery 1.7.2, which led me to assume this is a bug within the CRM, but it was actually caused by jQuery UI.
I guess this is because the CRM loads JS Webresources asynchronously?
I now enhanced my jQuery wrapper a check if my jQuery instance has been loaded yet (inspired by Scott's blog entry here, thanks btw. Your blog has been of great help to me :) ).
Thanks your help, guys!
Business Applications communities