tags:

views:

1862

answers:

2

We have a problem with the onload event of the form for a custom entity not firing. The form did work correctly for a period but recently has stopped working. Now none of the code in the event is executed when the form is opened - either when creating a new instance of the entity or when opening an existing one. The code does however get executed when the form is previewed.

For testing purposes the original code has been removed and the onload event currently only has the following:

crmForm.all.ownerid_c.style.display = 'none';
crmForm.all.ownerid_d.style.display = 'none';
alert("OnLoad event fired");

In preview the Owner attribute is hidden and the alert is shown. When running the form normally the attribute is not hidden and there is no alert (there are also no Java errors reported).

The full CRM version is 4.0.7333.1219. The entity was originally created on a different CRM installation which was initially version 3. That environment was upgraded to version 4 before we did the export – import process for migrating it to the current environment. The form worked correctly for a period of time on the new environment but at some stage stopped doing so.

+1  A: 

I enabled platform tracing using Microsoft Crm Diagnostics Tool 4 and now the onload event is executed. It still works when tracing is disabled again.

God I love developing in this environment.

Stupid things like this make it a pain >.<
benjynito
A: 

Hi! I have the same problem.... Have you solved yet? I'd appreciate your reply!

Thanks in advance. Carolina

Carolina