AnsweredAssumed Answered

getting undefined when trying to get field value on render event [SUGARCRM 7.9]

Question asked by Doddy Amijaya on Jun 1, 2017
Latest reply on Jun 12, 2017 by Doddy Amijaya

I actually have two questions...

1. I get undefined when trying to get a field value by doing this:

({

extendsFrom : 'RecordView',
initialize: function(options)
{
var self =this;
this._super('initialize',[options]);
self.on('render', console.log(self.model.get("mobile_c")), self);

},
})

I used this quite a lot, in the previous version (7.6 - 7.7) it works fine for me but not in 7.9. Any idea?

 

2. I also tried to add an on change event in the CreateView like so:

 this.model.once( "sync",
            function() {
                this.model.on(
                    "change:mobile_c",
                    this.CheckSomething(),
                    this
                );                
            },
            this
        );

 

but it never fires. i check and uncheck still nothing happens.

Outcomes