locked
Error CRM 2011 Object doesn't support property or method 'Form_onload' RRS feed

  • Question

  • Hi,

     

    I installed clean install on w2k8r2 with seperate server for SQl 2k8R2 in the install wizard i specified 2 user accounts for service accounts. When i finished installation of all components and i enter crm web and go for example to inovice and create one i get an error:

    ---------------------------
    Message from webpage
    ---------------------------
    There was an error with this field's customized event.

    Field:window

    Event:onload

    Error:Object doesn't support property or method 'Form_onload'
    ---------------------------
    OK  
    ---------------------------

    Does anyone has experience with these error?

    Any help is appriciated.

    Sunday, May 1, 2011 9:18 PM

Answers

  • Please check the onload event for invoice entity.

    • Go to settings=>customizations=>entities=>invoice.
    • click Forms and open the Main form.
    • Click Form Properties in the ribbon.
    • Check wheter you can find any script in Form Libraries and Event Handlers.

     


    Please remember to click “Mark as Answer” on the post that helps you. Jackie Chen, Microsoft Online Community Support
    Tuesday, May 10, 2011 6:31 AM

All replies

  • Have you found a solution for this problem??? I am facing the same behavior... 
    Sunday, May 8, 2011 8:49 AM
  • Please check the onload event for invoice entity.

    • Go to settings=>customizations=>entities=>invoice.
    • click Forms and open the Main form.
    • Click Form Properties in the ribbon.
    • Check wheter you can find any script in Form Libraries and Event Handlers.

     


    Please remember to click “Mark as Answer” on the post that helps you. Jackie Chen, Microsoft Online Community Support
    Tuesday, May 10, 2011 6:31 AM
  •  No, there is no script in the Invoice form... and the problem does not happen in this form only... it is in almost  every create or edit dialog in the system. it also appears in "Customize this system" dialog... i tried to debug the problem for task entity and found that it happens in the following script:

     

    var _formHierarchy = '\x7b\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22tab\x22,\x22id\x22\x3a\x22\x7be92df784-47af-48cf-a9cb-ee4811b87d10\x7d\x22,\x22name\x22\x3a\x22task\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22column\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22section\x22,\x22id\x22\x3a\x22\x7bea054020-22ab-4178-aeb7-3d664d96f88c\x7d\x22,\x22name\x22\x3a\x22task description\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b7bd07330-cc88-4056-acd1-dede64bcf1ca\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22subject\x22,\x22name\x22\x3a\x22subject\x22,\x22controlType\x22\x3a0\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b0fde8ba1-0edc-4953-b03d-51aca06cf83c\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22description\x22,\x22name\x22\x3a\x22description\x22,\x22controlType\x22\x3a0\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22section\x22,\x22id\x22\x3a\x22\x7bE8A0A1AE-3F40-471e-B06E-B221779CA511\x7d\x22,\x22name\x22\x3a\x22task details\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7baf141e99-5e42-4650-8e41-851d2128c4bf\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22regardingobjectid\x22,\x22name\x22\x3a\x22regardingobjectid\x22,\x22controlType\x22\x3a3\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b19816b9b-a8fc-4f92-818e-0a8c599f4107\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22ownerid\x22,\x22name\x22\x3a\x22ownerid\x22,\x22controlType\x22\x3a3\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b4ad7b570-173d-4202-855d-0029ec5d40bc\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22actualdurationminutes\x22,\x22name\x22\x3a\x22actualdurationminutes\x22,\x22controlType\x22\x3a0\x7d\x7d,\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b05145c34-364e-4cb6-ac01-de4abbec3949\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22prioritycode\x22,\x22name\x22\x3a\x22prioritycode\x22,\x22controlType\x22\x3a4\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7bcadc5253-c482-41f3-bd19-da0bf50c3274\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22scheduledend\x22,\x22name\x22\x3a\x22scheduledend\x22,\x22controlType\x22\x3a0\x7d\x7d,\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b5c548ccb-ea01-4ba8-bfa4-cef228e30aa6\x7d\x22,\x22child\x22\x3anull\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b61b62079-b04f-421a-997b-8b84164b54e7\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22category\x22,\x22name\x22\x3a\x22category\x22,\x22controlType\x22\x3a0\x7d\x7d,\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7bb200a0b7-a0d5-4eef-8b9c-8da47e7945fc\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22subcategory\x22,\x22name\x22\x3a\x22subcategory\x22,\x22controlType\x22\x3a0\x7d\x7d\x5d\x7d\x5d\x7d\x5d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22tab\x22,\x22id\x22\x3a\x22\x7bD87E07A3-11DA-4b8e-A8CC-F069EBC43FD4\x7d\x22,\x22name\x22\x3a\x22notes\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22column\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22section\x22,\x22id\x22\x3a\x22\x7b81A8A668-2716-4129-846D-E663546EC4FE\x7d\x22,\x22name\x22\x3a\x22notes\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x7b\x22__type\x22\x3a\x22cell\x22,\x22id\x22\x3a\x22\x7b169ed329-a2f4-43b6-8149-17df52f49381\x7d\x22,\x22child\x22\x3a\x7b\x22id\x22\x3a\x22notescontrol\x22,\x22name\x22\x3anull,\x22controlType\x22\x3a0\x7d\x7d\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d,\x7b\x22__type\x22\x3a\x22row\x22,\x22children\x22\x3a\x5b\x5d\x7d\x5d\x7d\x5d\x7d\x5d\x7d\x5d\x7d';
    Sys.Application.add_load(crmFormOnLoadHandler);
    function crmFormOnLoadHandler()
    {
    
    window.setTimeout('crmForm_window_onload_handler\x28Xrm.Page.ui\x29', 0);
    }
    
    function displayError(controlName, eventName, errorDescription)
    {
    	alert('There was an error with this field\x27s customized event.' + '\n\n' + 'Field\x3a' + controlName + '\n\n' + 'Event\x3a' + eventName + '\n\n' + 'Error\x3a' + errorDescription);
    }
    
    function crmForm_window_onload_handler(eventObj,eventArgs)
    {
    
    	try
    	{
    		var eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,null);
    eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,eContext)
    		Mscrm.Form_onload();
    
    	}
    	catch(e)
    	{
    	displayError('window', 'onload', e.description);
    
    	}
    if(Mscrm.ClientApiConstants!=null&&Mscrm.ClientApiConstants.primaryEntityId!=null){var oPrimaryEntity = $find(Mscrm.ClientApiConstants.primaryEntityId);if(oPrimaryEntity!=null){initialFormXml=oPrimaryEntity.serialize(Mscrm.SerializationMode.onlyDirtyValues);}}}
    
    
    the line Mscrm.Form_onload(); is what causing the error to happen.

    the file is called formScript.js.aspx

     

     


    • Proposed as answer by Ziwar Majeed Monday, May 30, 2011 6:21 AM
    • Unproposed as answer by Ziwar Majeed Monday, May 30, 2011 6:22 AM
    Tuesday, May 10, 2011 7:01 AM
  • Hi Mark,

    Is this a new CRM2011 installation or upgraded from CRM 4.0 to CRM2011?

    I got this message when ever i upgraded the CRM 4.0  to CRM2011.

    Go to Invoice form and disable the java script, it will work.


    Khaja Mohiddin
    Tuesday, May 10, 2011 5:16 PM
  • Hi Jackie,

    This is an new installation, even when i go to customizations i have this error:

    There was an error with this field's customized event.

    Field:window

    Event:onload

    Error:Object doesn't support property or method 'Form_onload'
    ---------------------------
    OK
    ---------------------------

     

    When i continue to the form as described i get the following error when opening mail form for invoice:

    Record is unavailable

    The requested record was not found or you do not have suffiecient permissions to view it.

    Mark

    Friday, May 13, 2011 12:14 PM
  • Did you add IFrame?

    i think the URL which you have provided for IFRAME is wrong.


    Khaja Mohiddin
    Wednesday, May 18, 2011 7:51 PM
  • I have the same error at Windows Server 2008 R2 and IIS 7.5
    Monday, May 23, 2011 8:22 AM
  • It was a server side problem. I don't know exactly why it happens. we also tried to do an installation repair but that didn't solve it. Finally,  we installed a fresh CRM 2011 copy on a new server, imported the database and ran Data migration manager. and the error disappeared.
    • Proposed as answer by Ziwar Majeed Monday, May 30, 2011 6:22 AM
    Monday, May 30, 2011 6:22 AM
  • I have the same error. Installing a fresh copy of CRM 2011 on a new server is not an option for me (nor should it have to be...) I just installed Rollup 6 and the issue began. I know this thread is 8 months old but I'd appreciate it if anyone has found additional resolutions to this since the thread...

     

    Wednesday, February 1, 2012 3:17 PM
  • Hi JSB

    I know this is very late but I noticed no one answered you.  And maybe this will help someone in the future.

    On some systems installing Rollup 6 can cause problems like this.

    Loading rollup 7 or 8 will likely solve the problem.

    Paul

    Thursday, June 28, 2012 4:56 PM