MS Dynamics CRM 4.0 - onChange event error

Posted by Brett on Stack Overflow See other posts from Stack Overflow or by Brett
Published on 2010-06-03T14:55:08Z Indexed on 2010/06/03 19:04 UTC
Read the original article Hit count: 540

Hi

I have an onChange event that keeps bringing up the error below whenever I preview it.

'Object doesnt support this property or method'

I have the onChange event associated with a picklist and when a specific option is selected another field is unhidden.

The code is below:

onLoad:

//If How did you hear about us is set to event show the Source Event lookup
crmForm.SourceEvent = function SourceEvent() 
{
if (crmForm.all.gcs_howdidyouhearaboutus.DataValue == 5)
{
crmForm.all.gcs_sourceeventid_c.style.display = '' ;
crmForm.all.gcs_sourceeventid_d.style.display = '' ;
}
else
{
crmForm.all.gcs_sourceeventid_c.style.display = 'none' ;
crmForm.all.gcs_sourceeventid_d.style.display = 'none' ;
}
}
crmForm.SourceEvent() ;

onChange

crmForm.SourceEvent() ;

Would be great if someone could let me know why this error is showing up?

Also, this has happened on a few onChange events on the form preview but once published onto the live system it does not error. Any ideas?

Thank you

Brett

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dynamics-crm