简体   繁体   中英

Crm 2011 with no javascript customizations gives onload errors

we are getting the following error in almost all create or edit entity forms. the systems is not customized at all and it works perfectly:

There was an error in the fields customized event. field:window event:onload error: object doesn't support this property or method

after debugging the error I found out that it is happening in FormScript.js.aspx page in the following code block:

var eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,null);
eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,0,null,eContext)
Mscrm.Form_onload();

Mscrm.Form_onload() is what causing the error to happen. do you have any idea why is this happening?

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.

Are you absolutely positive there is no script attached to run on load of any of the entities that are having issues? That particular function should just run any custom script you have on the entity, so I don't see any other cause.

Odd, there is certainly some garbage in there somewhere

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)
    loadInsideView();
    eContext=Mscrm.FormUtility.constructExecutionObject(eventObj,1,null,eContext)
    CEI.Initialize();
  } catch(e) {
    displayError('window', 'onload', e.description);
  }
}

Here is one from our system on the account form. I have no idea how this could have happened, but I would check the events for the page (not just the onload). I would also try adding a JavaScript web resource with a generic event to the onload to see if by toggling it on, the system might clean itself up. You may have to call Microsoft or find the issue in your 4.0 and fix it to do another re-install. I feel for you on this one!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM