Jaa


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

Comments

  • Anonymous
    April 30, 2008
    PingBack from http://microsoftnews.askpcdoc.com/flat-out-geek/field-events-fireonchange

  • Anonymous
    May 01, 2008
    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.