OnChange event of the form fields in a CRM Dync have a peculiarity ... The event runs when you lose focus. This detail could create us some difficulties which we would be forced to run the event immediately after changing its value and not after it has lost focus of the field. Consider the following example:
SCENARIO
checkbox field is has the "courage" and a text field box "description." The "description" should be disabled unless you have selected the value field.
if (crmForm.all.valor.DataValue == true) crmForm.all.descripcion.Disabled = false;
option that quoted above works if and only if after having placed a check in the "value" is given by clicking elsewhere on the form or if you press the TAB key.
CORRECT SOLUTION
In the OnLoad event of the form will post the following function
MyFunction () {
if (crmForm.all.valor.DataValue == true) crmForm.all.descripcion.Disabled = false ;} crmForm.all.valor.attachEvent ('onclick', MyFunction)
0 comments:
Post a Comment