locked
Seeing Multiple Script Errors in CRM 2011 web client RRS feed

  • Question

  • Hi

    We have an on-premises CRM2011 with all updates applied. 

    Since upgrading from the previous version of CRM we have been seeing multiple CRMScript errors when using the Web client with IE on W8.1.  We don't see these when accessing CRM via Outlook 2013.

    The errors don't appear to stop CRM from function though.

    Can anyone help with a fix please?

    I have included a couple of the most common errors we are seeing below.

    TIA

    Antony

    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>'gs' is undefined</Message>
       <Line>339</Line>
       <URL>/main.aspx</URL>
       <PageURL>/main.aspx#382815565</PageURL>
       <Function>elapsedTime(a)</Function>
       <CallStack>
        <Function>elapsedTime(a)</Function>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; InfoPath.3; MS-RTC LM 8)</BrowserUserAgent>
       <BrowserLanguage>en-US</BrowserLanguage>
       <SystemLanguage>en-US</SystemLanguage>
       <UserLanguage>en-US</UserLanguage>
       <ScreenResolution>1920x1080</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2014-03-06T15:38:09</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1033</OrgLanguage>
        <OrgCulture>1033</OrgCulture>
        <UserLanguage>1033</UserLanguage>
        <UserCulture>1033</UserCulture>
        <OrgID>{589DF761-0EBF-4A55-891A-9B8ADFE78C25}</OrgID>
        <UserID>{ACFF8BCB-E8A7-DA11-8220-0003FF6388F1}</UserID>
        <CRMVersion>6.0.1.61</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>
    
    
    
    
    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>Unable to get property 'toString' of undefined or null reference</Message>
       <Line>1</Line>
       <URL>/_static/_common/scripts/main.js?ver=1377865289</URL>
       <PageURL>/main.aspx#432870790</PageURL>
       <Function>anonymous($p0){var$v_0=$p0.clone();$v_0.clearQuery();var$$dict_2=$p0.get_query();for(var$$key_3in$$dict_2){var$v_4={key:$$key_3,value:$$dict_2[$$key_3]};if($v_4.key==="extraqs")$v_0.appendToQuery($v_4.value.toString());else$v_0.get_query()[$v_4.key]=$v_4.</Function>
       <CallStack>
        <Function>anonymous($p0){var$v_0=$p0.clone();$v_0.clearQuery();var$$dict_2=$p0.get_query();for(var$$key_3in$$dict_2){var$v_4={key:$$key_3,value:$$dict_2[$$key_3]};if($v_4.key==="extraqs")$v_0.appendToQuery($v_4.value.toString());else$v_0.get_query()[$v_4.key]=$v_4.value}var$v_1=null,$v_2="0";switch($p0.get_pageType()){case"entityrecord":var$v_3=IsNull($v_0.get_query()["id"]);if(!$v_3)$v_1="_E_"+$v_0.get_query()["etc"].toString()+$v_0.get_query()["id"].toString();else$v_1="_E_"+$v_0.get_query()["etc"].toString()+"_new";break;case"entitylist":$v_1="_G_"+$v_0.get_query()["etc"].toString()+"_";if("layout"in$v_0.get_query())$v_2=$v_0.get_query()["layout"].toString();$v_1+=$v_2;if("viewid"in$v_0.get_query())$v_1+=$v_0.get_query()["viewid"].toString();break;default:$v_1=$p0.toString();break}return$v_1}</Function>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Tablet PC 2.0; InfoPath.3; MS-RTC LM 8)</BrowserUserAgent>
       <BrowserLanguage>en-US</BrowserLanguage>
       <SystemLanguage>en-US</SystemLanguage>
       <UserLanguage>en-US</UserLanguage>
       <ScreenResolution>1920x1080</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2014-03-06T15:39:17</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1033</OrgLanguage>
        <OrgCulture>1033</OrgCulture>
        <UserLanguage>1033</UserLanguage>
        <UserCulture>1033</UserCulture>
        <OrgID>{589DF761-0EBF-4A55-891A-9B8ADFE78C25}</OrgID>
        <UserID>{ACFF8BCB-E8A7-DA11-8220-0003FF6388F1}</UserID>
        <CRMVersion>6.0.1.61</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>
    
    

    Thursday, March 6, 2014 2:57 PM

All replies

  • What version of IE are you running?  IE11 is not supported.  IE10 will need to run in compatibility mode.

    http://support.microsoft.com/kb/2669061


    Jason Peterson

    Thursday, March 6, 2014 3:20 PM
  • Check your custom scripts. First one looks like a custom script failing. 

    Second one could be a browser incompatibility, or another custom script error. 

    You say upgrading from the previous version of CRM, did you go from 4.0 to 2011? On an upgrade like that you should be re-testing all custom components and custom script anyways.

    Friday, March 7, 2014 11:30 PM
  • Hi Nico

    I don't believe we have any custom scripts on the install.  The only changes made to an OOB install are some Workflows all of which were built using the built-in CRM editor and all were started after upgrading to 2011.

    If it is a custom script where would I find the script?

    TIA

    Antony 

    Monday, March 10, 2014 11:00 AM
  • Hi Jason,

    OK when using IE I am using IE11.  However we are seeing the same when using say the latest Firefox or Chrome which I understand are supported. So we shouldn't get the errors then?

    TIA

    Antony

    Monday, March 10, 2014 11:02 AM
  • Look into Settings > Customizations > Customize the System > Web Resources. All scripts will be there as a Script (JScript) type resource. If you don't have any scripting customizations, you will not have any of those resources there.
    • Edited by Nico-TMVP Monday, March 10, 2014 1:31 PM
    Monday, March 10, 2014 1:30 PM
  • Hi Nico-T

    Thanks for you help I appreciate it.

    The only script I found was called 'Invoice_main_library.js' the contents were:

    function opportunityid_onchange()
    {
    
    }

    Before attempting to delete the Web Resource I checked the dependencies and the following item is dependent on the JS

    Display Name: Form
    Name/Id: Information
    Component Type: system Form
    Parent Entity: Invoice
    Managed Solution: System Solution
    Dependency Type: Published

    As the function is empty I don't think it has anything to do with the "'gs' is undefined error". Am I right? 

    I opened the Information Invoice form in the form editor and checked the field properties for the Opportunity control and found the reference to the above JS in the form libraries and the function in the Event handlers.  The Event handler showed the opportunityid_onchange function as disabled.  As the handler function was empty I deleted it from the Event Handleer section and then the Library from the form library section. Saved and published the Invoice Information form.

    I then went and deleted the .js script from the web resource section.  Now there are no entries in the web resource section yet we are still getting the 'gs' is undefined error.

    Any other ideas?

    Tuesday, March 11, 2014 10:02 AM