Welcome to MSDN Blogs Sign in | Join | Help

East Region Microsoft CRM Blog

This Blog is focused on Microsoft CRM. It specalizes in news for CRM partners and customers, customization tools for demos and local events in the Microsoft East Region.

News

  • Welcome to the Mid-Atlantic CRM Blog, formerly owned and operated by Ben Vollmer, a CRM legend ;). My name is Chris Kahl and Ben has asked me to take over the care and feeding of this most valuable resource. Like Ben, my job is to help partners and customers with Microsoft CRM in the Eastern US. This blog is a great and searchable information source. Feel free to subscribe to the RSS feed to stay current with Dynamics CRM. Any tools discussed here are for DEMO only. You should NOT use these in a production environment unless you test them. Microsoft Support DOES NOT support these tools. Everything here is provided as-is with no warranty.
Field Events: FireOnChange

Almost two years ago, there was a tip published here about auto saving forms from a JScript OnChange event.  While poking around the SDK tonight looking for something, I found a cool nugget. You can force the OnChange event to occur for a field from the Microsoft Dynamics CRM form OnLoad event or from the OnChange event of some other field. To do this, use the FireOnChange method.

For example, you may use the following sample script:

crmForm.all.YourFieldID.FireOnChange();

You should take a peek at the SDK for some cool nuggets like this. :-)

Happy Demo'ing!

Field Events: OnChange

Posted: Wednesday, April 30, 2008 8:30 PM by Ben Vollmer
Filed under:

Comments

Nick Doelman said:

For some reason the FireOnChange doesn't always work in CRM 4.0 (it seems in onload form events).

I have found that in this case you can use:

YourFieldID_onchange0();

do not put in the "crmForm.all."

Not sure why, but hopefully this tip will save someone some frustration.

# May 1, 2008 1:10 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker