Why does 'on change' fire when record view is loaded?

I must be missing something...

Why do on change events fire when the record view is loaded before that field is indeed changed?

How can I stop the execution of an on change until the field is actually changed?

thanks,
Francesca
Parents
  • Hi Francesca,

    Just one suggestion, you can use
    _.isUndefined(this.model.previous('contact_id_c')) instead of
    typeof(this.model.previous('contact_id_c'))!=='undefined'
    as sugar team is suggesting to make use of underscore functions as much as possible during customzation!

    Thanks!

Reply
  • Hi Francesca,

    Just one suggestion, you can use
    _.isUndefined(this.model.previous('contact_id_c')) instead of
    typeof(this.model.previous('contact_id_c'))!=='undefined'
    as sugar team is suggesting to make use of underscore functions as much as possible during customzation!

    Thanks!

Children
No Data