Hi all
I've created a new HTML Web Resource, and populated it as follows:
<html> <head> </head> <body> <script src="../ClientGlobalContext.js.aspx" type="text/javascript"></script> <div><span>testing</span></div> </body> </html>
As you can see, there is nothing in there except the loading of the scripts from ../ClientGlobalContext.js.aspx.
Once this page has loaded, if I press the control key (either of them), I get the following error logged in the console (Chrome below, but I get a similar error in all browsers):
global.ashx?ver=883953442:4024 Uncaught TypeError: Cannot read property 'toString' of undefined at Function.Mscrm.Utilities.getResourceValue (global.ashx?ver=883953442:4024) at HTMLDocument.Mscrm.GlobalEvents.$6B (global.ashx?ver=883953442:4024) at HTMLDocument.b (MicrosoftAjax.js?ver=883953442:2922) Mscrm.Utilities.getResourceValue @ global.ashx?ver=883953442:4024 Mscrm.GlobalEvents.$6B @ global.ashx?ver=883953442:4024 b @ MicrosoftAjax.js?ver=883953442:2922
It doesn't show to the user (no popup error or anything), but it's annoying for trying to catch my own errors I throw on the page, because I keep intercepting these CRM errors.
Does anyone
This is an on-premise, v8.2 instance. Our dev instance in this case, but it's happening on our live instance, too.
Any help appreciated.
Thanks
*This post is locked for comments
Hello,
I get exactly the same error when working with a web-resource which is opened as a pop-up from CRM form by the following code.
window.open(url_of_the_web_resource, "_blank", features, false);
I also take a look to the function "Mscrm.Utilities.getResourceValue" and see that the "window.top.LOCID_JUMP_TO_RIBBON" is undefined at this moment
Mscrm.Utilities.getResourceValue = function (value, resourceKey) { if (!Mscrm.InternalUtilities._Script.isNullOrUndefined(value)) return value; else { var $v_0 = null; switch (resourceKey) { case "LOCID_JUMP_TO_RIBBON": $v_0 = window.top.LOCID_JUMP_TO_RIBBON.toString(); break; case "LOCID_JUMP_TO_RIBBON_CONTROL": $v_0 = window.top.LOCID_JUMP_TO_RIBBON_CONTROL.toString(); break } return $v_0 } };
Do you have any update for this error?
Thanks.
I am not sure why this is not working , just give a try to create another html web resource and add below line in the header , and then add the html in any form of any entity and test once . May be it will helps you to find out the root cause , ideally its should work.
<script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
Any suggestions, anyone?
Sorry Goutam, I'm not sure what you're asking? I'll try my best: the user logs into CRM, and is presented with a dashboard. There is a link on this dashboard to the page in question. The page is a custom HTML Web Resource.
Does this help?
Hello ,
Seems its depends on where you are showing your custom HTML web resource , can you please tell me where you are displaying the web resource.
Thanks Goutam. Unfortunately no luck with either suggestion. Removing the "../" resulted in a 404 for the resource, and moving the script tag to the header still gives the same ctrl-key error.
Hello ,
Try with this , inside header part and removing the "../"
<html> <head> <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script> </head> <body> <div><span>testing</span></div> </body> </html>
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156