Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / Adrian Begovich's Blog / Dynamics 365: ReferenceErro...

Dynamics 365: ReferenceError: '$' is undefined

Adrian Begovich Profile Picture Adrian Begovich 1,014 Super User 2024 Season 2

When working with Dynamics 365 you may encounter a ReferenceError: '$' is undefined at... error message similar to this:

Script-Error.jpg

This error message occurs when a custom script depends on jQuery, but jQuery did not load before the script executes. You can find the JavaScript file causing the error using the information in the Script Error combined with the associated log obtained from clicking the Download Log File button.

If the jQuery is on the page but not loading in the correct order then you can resolve the error message with the below script:

if (typeof($) === 'undefined') {
	$ = parent.$;
	jQuery = parent.jQuery;
}

Comments

*This post is locked for comments