locked
_formHierarchy is undefined .... RRS feed

  • Question

  • hi,

    i checked other topics but i don't find a answer.

     

    I have only this code :

     

    function copyAddressEnvoi(pickListValue)  
    {  
        if (pickListValue==null) return;  
        
        switch(pickListValue)
        {
            case '127400002':
    Xrm.Page.getAttribute("address1_title").setValue(Xrm.Page.getAttribute("new_titre").getValue());
    Xrm.Page.getAttribute("address1_firstname").setValue(Xrm.Page.getAttribute("firstname").getValue());
    Xrm.Page.getAttribute("address1_lastname").setValue(Xrm.Page.getAttribute("lastname").getValue());
    Xrm.Page.getAttribute("address1_enterprise").setValue(Xrm.Page.getAttribute("fe_address2_enterprise").getValue());
    Xrm.Page.getAttribute("address1_fonction").setValue('');
    Xrm.Page.getAttribute("address1_line1").setValue(Xrm.Page.getAttribute("address2_line1").getValue());
    Xrm.Page.getAttribute("address1_line2").setValue(Xrm.Page.getAttribute("address2_line2").getValue());
    Xrm.Page.getAttribute("address1_line3").setValue(Xrm.Page.getAttribute("address2_line3").getValue());
    Xrm.Page.getAttribute("address1_postoffice").setValue(Xrm.Page.getAttribute("address2_postofficebox").getValue());
    Xrm.Page.getAttribute("address1_postalcode").setValue(Xrm.Page.getAttribute("address2_postalcode").getValue());
    Xrm.Page.getAttribute("address1_city").setValue(Xrm.Page.getAttribute("address2_city").getValue());
    break;    
    
            case '127400003':
    Xrm.Page.getAttribute("address1_firstname").setValue(Xrm.Page.getAttribute("firstname").getValue());
    Xrm.Page.getAttribute("address1_lastname").setValue(Xrm.Page.getAttribute("lastname").getValue());
    Xrm.Page.getAttribute("address1_enterprise").setValue(Xrm.Page.getAttribute("fe_address2_enterprise").getValue());
    Xrm.Page.getAttribute("address1_fonction").setValue('');
    Xrm.Page.getAttribute("address1_line1").setValue(Xrm.Page.getAttribute("address3_line1").getValue());
    Xrm.Page.getAttribute("address1_line2").setValue(Xrm.Page.getAttribute("address3_line2").getValue());
    Xrm.Page.getAttribute("address1_line3").setValue(Xrm.Page.getAttribute("address3_line3").getValue());
    Xrm.Page.getAttribute("address1_postoffice").setValue(Xrm.Page.getAttribute("address3_postofficebox").getValue());
    Xrm.Page.getAttribute("address1_postalcode").setValue(Xrm.Page.getAttribute("address3_postalcode").getValue());
    Xrm.Page.getAttribute("address1_city").setValue(Xrm.Page.getAttribute("address3_city").getValue());
    break;    
      }
    }
    
    
    function fe_address1copieradresse_onchange()
    {
     copyAddressEnvoi(Xrm.Page.getAttribute("fe_address1copieradresse").getSelectedOption().text);
    }

    and i have this error, Syntax error, and formHierarchy is undefined, why??? :

    Contenu du rapport d'erreurs Microsoft Dynamics CRM

    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>Erreur de syntaxe</Message>
       <Line>1</Line>
       <URL>/_forms/FormScript.js.aspx?FormName=crmForm&formid=fb6fea52-c9fa-4209-99ad-0ef432d45448&fver=641676330&isbulkedit=false&ver=47690263</URL>
       <PageURL>/userdefined/edit.aspx?_gridType=2&etc=2&id=%7bD882755B-44A0-E211-A46C-5E58712A47C8%7d&pagemode=iframe&preloadcache=1366708300588&rskey=758274926</PageURL>
       <Function></Function>
       <CallStack>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)</BrowserUserAgent>
       <BrowserLanguage>fr-FR</BrowserLanguage>
       <SystemLanguage>fr-CH</SystemLanguage>
       <UserLanguage>fr-CH</UserLanguage>
       <ScreenResolution>1219x975</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2013-04-23T11:11:41</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1036</OrgLanguage>
        <OrgCulture>1036</OrgCulture>
        <UserLanguage>1036</UserLanguage>
        <UserCulture>1036</UserCulture>
        <OrgID>{065CDA33-B6C9-4A5A-8332-322D218EFB42}</OrgID>
        <UserID>{60401789-8091-E211-A28B-5E58712A47C8}</UserID>
        <CRMVersion>5.0.9690.3236</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>

    <CrmScriptErrorReport>
      <ReportVersion>1.0</ReportVersion>
      <ScriptErrorDetails>
       <Message>« _formHierarchy » est indéfini</Message>
       <Line>1</Line>
       <URL>/_static/_common/scripts/PageLoader.js?ver=47690263</URL>
       <PageURL>/main.aspx?etc=2&extraqs=%3f_gridType%3d2%26etc%3d2%26id%3d%257bD882755B-44A0-E211-A46C-5E58712A47C8%257d%26pagemode%3diframe%26preloadcache%3d1366708300588%26rskey%3d758274926&pagetype=entityrecord</PageURL>
       <Function>executeAction(action)</Function>
       <CallStack>
        <Function>executeAction(action)</Function>
       </CallStack>
      </ScriptErrorDetails>
      <ClientInformation>
       <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)</BrowserUserAgent>
       <BrowserLanguage>fr-FR</BrowserLanguage>
       <SystemLanguage>fr-CH</SystemLanguage>
       <UserLanguage>fr-CH</UserLanguage>
       <ScreenResolution>1219x975</ScreenResolution>
       <ClientName>Web</ClientName>
       <ClientTime>2013-04-23T11:11:41</ClientTime>
      </ClientInformation>
      <ServerInformation>
        <OrgLanguage>1036</OrgLanguage>
        <OrgCulture>1036</OrgCulture>
        <UserLanguage>1036</UserLanguage>
        <UserCulture>1036</UserCulture>
        <OrgID>{065CDA33-B6C9-4A5A-8332-322D218EFB42}</OrgID>
        <UserID>{60401789-8091-E211-A28B-5E58712A47C8}</UserID>
        <CRMVersion>5.0.9690.3236</CRMVersion>
      </ServerInformation>
    </CrmScriptErrorReport>

     

    I don't find a solution, please help me, i am lost now...

    Tuesday, April 23, 2013 9:13 AM

All replies

  • hey, did you check this ?

    Thanks and Regards. Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Tuesday, April 23, 2013 9:25 AM
  • yes i haved check, and i didn't find the form onload. but i just forgot to put "function form onload" at the beginning of my code. So it's ok...

    sorry, and thx :)

    Tuesday, April 23, 2013 9:35 AM
  • you can delete this useless post! i m sorry its the same than the others...
    Tuesday, April 23, 2013 9:37 AM