Answered by:
Cases Entity Onload event not working

Question
-
Hi,
I'm working with the evaluation contoso VM (CRM 4.0) to create a demonstration tool.
I've successfully embedded a map into the "Accounts" entity which zooms and centres to the location of the property, based on location attributes.
This was achieved by using an Iframe under a custom tab, and then using the Form's OnLoad event to create the URL that I pass to the src of the Iframe. Nice and simple.
I now need to do the same thing in the "Cases" entity. However, when I try to customise the Cases form, I can create all the controls, but nothing fires in terms of events.
So as an example I have placed the following code into both the OnLoad and OnSave events:
alert("boo");
and nothing happens. The cases form opens, and shows me my nice new Iframe with a static page in there, but no firing of events occurs, at either event.
Can anyone help me please?
Kind Regards,
Scott TansleyFriday, October 30, 2009 12:36 PM
Answers
-
Hi,
If you have just written
alert("boo");
there is no chance of syntax error,Just check
1. Have you enabled event.
2. try to reset IIS.( most of the time i solved customization issues just reseting my contoso VM (CRM 4.0) ... :) )
Hope it will help !!!!
Mahain- Marked as answer by ScottTansley_GIS Friday, October 30, 2009 1:02 PM
Friday, October 30, 2009 12:56 PMModerator
All replies
-
Are you sure you published the correct entity?
If you're using IE8 try using debugger (F12). Maybe you made a syntactic error that prevent's onload being fired.Friday, October 30, 2009 12:41 PM -
Thanks for the response. Yep. Everytime I try to make a change in the onload event, I change the static url of the IFrame, to ensure that the publish has worked. Each time I then open the Cases Form I get the new URL.
literally the only code I have in the OnLoad event is:
alert("boo");
so I can't see how it can be a syntax error???
I've made the same changes to other entities, with no problems, it's just cases...
Thanks,
ScottFriday, October 30, 2009 12:55 PM -
Hi,
If you have just written
alert("boo");
there is no chance of syntax error,Just check
1. Have you enabled event.
2. try to reset IIS.( most of the time i solved customization issues just reseting my contoso VM (CRM 4.0) ... :) )
Hope it will help !!!!
Mahain- Marked as answer by ScottTansley_GIS Friday, October 30, 2009 1:02 PM
Friday, October 30, 2009 12:56 PMModerator -
Mahain,
You win... Thanks - a reset of IIS has got me going... So silly of me, new to Dynamics, and didnt' think out of the box.
Have a good day!
ScottFriday, October 30, 2009 1:02 PM -
Hi Scott,This might be related to caching on your browser, try to go to Internet Options | Browsing history | Settings, change the radio button to "Every time I visit the web page", click OK. Refresh your page to see if it works for you.I hope this helps!
Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com- Proposed as answer by darrenliuMicrosoft employee, Moderator Friday, October 30, 2009 1:02 PM
Friday, October 30, 2009 1:02 PMModerator -
Hi,
I would rather agree with Darren and the caching issue. If you are going to do more client side (Javascript) coding, I would recommend you some tips mentioned here: http://blogs.inetium.com/blogs/azimmer/archive/2009/03/08/five-tips-for-productive-form-scripting-in-crm-4-0.aspx (using external files is really helpful). After successful development you can still paste all the developed code into CRM directly.
Happy developing!Friday, October 30, 2009 1:10 PM