locked
Error closing window - Object doesn't support property or method 'setFormMode' RRS feed

  • Question

  • I have a 3rd party application that links to Contacts in CRM.  When the Contact record opens everything looks fine, but when closing the window I get an error message with the following details:

    =============

    Microsoft Dynamics CRM Error Report Contents

    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>Object doesn't support property or method 'setFormMode'</Message>
       <Line>357</Line>
       <URL>/main.aspx?etn=contact&extraqs=etc%3d2%26id%3d%257bEA35AA0F-A5E0-E111-B52B-005056A160DB%257d&id=%7bEA35AA0F-A5E0-E111-B52B-005056A160DB%7d&pagetype=entityrecord</URL>
       <PageURL>/main.aspx?etn=contact&extraqs=etc%3d2%26id%3d%257bEA35AA0F-A5E0-E111-B52B-005056A160DB%257d&id=%7bEA35AA0F-A5E0-E111-B52B-005056A160DB%7d&pagetype=entityrecord</PageURL>
       <Function></Function>
       <CallStack>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729)</BrowserUserAgent>
       <BrowserLanguage>en-us</BrowserLanguage>
       <SystemLanguage>en-us</SystemLanguage>
       <UserLanguage>en-us</UserLanguage>
       <ScreenResolution>1892x983</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2012-08-09T14:34:22</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1033</OrgLanguage>
        <OrgCulture>1033</OrgCulture>
        <UserLanguage>1033</UserLanguage>
        <UserCulture>1033</UserCulture>
        <OrgID>{F912662E-9FEB-4DF2-A3FB-7C628E186BEC}</OrgID>
        <UserID>{DA4CB24F-9985-E111-B6F2-005056A160DB}</UserID>
        <CRMVersion>5.0.9690.2243</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>

    ================

    We have Rollup-8 installed, which is what some other topics I found suggested.

    Any help?

    Thursday, August 9, 2012 7:39 PM

Answers

  • There's a function called SaveReadOnly() that is called onSave:

    function saveReadOnly()

    {

    var nonSubmitFields = Xrm.Page.ui.controls.get(function (control, index){return control.getDisabled() == true;});

    for (i = 0; i < nonSubmitFields.length; i++)

    {

    try

    {

    nonSubmitFields[i].getAttribute().setSubmitMode("always");

    }

    catch(error)

    { }

    }

    }


    • Proposed as answer by dannychristy Friday, August 10, 2012 6:43 AM
    • Marked as answer by mdecap Wednesday, October 31, 2012 9:13 PM
    Thursday, August 9, 2012 8:31 PM

All replies

  • You should contact the 3rd Party Add-On Provider

    Carsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist CRM Online 30 Tage kostenfrei testen – http://crm.dynamics.com/de-de/trial-overview

    Thursday, August 9, 2012 7:41 PM
  • It's not a problem with the 3rd party app - they simply provide a URL link to the CRM environment, which all loads up fine.

    It's when trying to close the CRM window that the error is triggered.

    Thursday, August 9, 2012 7:43 PM
  • Any on save Events triggered?

    Carsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist CRM Online 30 Tage kostenfrei testen – http://crm.dynamics.com/de-de/trial-overview

    Thursday, August 9, 2012 7:47 PM
  • There's a function called SaveReadOnly() that is called onSave:

    function saveReadOnly()

    {

    var nonSubmitFields = Xrm.Page.ui.controls.get(function (control, index){return control.getDisabled() == true;});

    for (i = 0; i < nonSubmitFields.length; i++)

    {

    try

    {

    nonSubmitFields[i].getAttribute().setSubmitMode("always");

    }

    catch(error)

    { }

    }

    }


    • Proposed as answer by dannychristy Friday, August 10, 2012 6:43 AM
    • Marked as answer by mdecap Wednesday, October 31, 2012 9:13 PM
    Thursday, August 9, 2012 8:31 PM
  • The URL that the 3rd party app links to is structured as follows:

    http://domain/organization/sfa/conts/edit.aspx?id={ContactID}

    If I manually type this into the address bar in IE, it opens fine and also closes without issue.

    However, when that links is opened in a new IE window from the 3rd party app, it opens fine but causes the error listed above when trying to close.  I don't know what might be different between typing the URL in manually and clicking a link to the same exact URL - but one causes it to error when closing and the other does not.





    • Edited by mdecap Thursday, August 9, 2012 8:55 PM
    Thursday, August 9, 2012 8:52 PM