javascript - Libraries not loading on form load- CRM 2016 -


we upgrading crm 2011 crm 2016 on premise. have libraries added on form load in address entity form libraries aren't being loaded @ first time ans showing error message 'mscrm' undefined in below code snippet , page.

     <script language="javascript">     window.settimeout(ribbonrefreshforarticle, 2000);     function ribbonrefreshforarticle() {     var uri = mscrm.crmuri.create(window.location.href);     if (uri.get_query() != null && uri.get_query()["etc"] == mscrm.internalutilities.entitytypecode.kbarticle) {     refreshribbon();     } } </script> 

page- http://myorg/testdev/userdefined/edit.aspx?_createfromid={447ae3ee-2727-e511-84e4-005056b33beb}&_createfromtype=2&_gridtype=1071&etc=1071&id={858c47d7-62ae-43de-a13b-2f648efd111e}&pagemode=iframe&rskey={03315b35-4585-4447-a4d2-059cf79ca0fd}

need help.thanks in advance.

i'm little confused snippet, you're showing js within context of html script tag, you're defining being called form load.

if have html web resource, must first add clientglobalcontext <script src="../clientglobalcontext.js.aspx?type=script" type="text/javascript"></script> ("../" may vary depending on resource path), , wait document ready:

$(document).ready(() => {     onload();     }); 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -