Hi,
We get the following error when openening different entities (e.g. contact and opportunty).
ReferenceError: $ is not defined
at getSettings (xxxxx.crm.dynamics.com/.../pre_fieldsecuritydynamicshow)
at onLoading (xxxxx.crm.dynamics.com/.../pre_fieldsecuritydynamicshow) at eval (eval at RunHandlerInternal (xxxxx.crm.dynamics.com/.../ClientApiWrapper.aspx:142:32), <anonymous>:1:1) at RunHandlerInternal (xxxxx.crm.dynamics.com/.../ClientApiWrapper.aspx:142:1) at RunHandlers (xxxxx.crm.dynamics.com/.../ClientApiWrapper.aspx:101:105) at OnScriptTagLoaded (xxxxx.crm.dynamics.com/.../ClientApiWrapper.aspx:215:1) at xxxxx.crm.dynamics.com/.../ClientApiWrapper.aspx:186:1
Is this a know issue? It looks like a jquery error.
*This post is locked for comments
you just save my day. :)
This worked too, but for Chromes , it give an a warning though it still works
Worked for Me , Is better because it works for all browsers including chrome . Thanks
Hi Ben ,
Your 4 lines of code was a life saver for me. If you do not mind can you please explain waht it does ? I am fairly new to both Js and CRM.
Thanks
Adding
if (typeof ($) === 'undefined') { $ = parent.$; jQuery = parent.jQuery;
in Dynamics 365 too resolved the issue !
You can also use requireJs for Injecting Jquery before your function. e.g.
//add require js first
require(['https://code.jquery.com/jquery-2.2.0.min.js'],function(){
//your code
})
Hi Ben,
thank you for your post from 11 Aug 2015 6:08 AM. I placed your code in all my custom codes and now my CRM2016 On Prem works.
What a releave :-)
Axel
That works, but the legacy form rendering is much slower than the new form rendering, and also that option will be switched off in a future update (see technet.microsoft.com/.../dn531078.aspx).
Setting the "Use legacy form rendering" option to Yes worked for me.
Thnx
Even better, I discovered that jQuery is actually on the page, but the user-defined scripts are now being loaded in an iframe below where jQuery is loaded. The following is an even better fix:
if (typeof($) === 'undefined') { $ = parent.$; jQuery = parent.jQuery; }
Regards, Ben
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Aric Levin - MVP 2 Moderator
HR-09070029-0 2
MA-04060624-0 1