AnsweredAssumed Answered

on change firing when page is loading

Question asked by sidhu sidhu on Feb 9, 2016
Latest reply on Feb 9, 2016 by Ajay Kumar

Hi All

 

     I need to trigger an event on change in record view

 

I have used

({

     extendsFrom: 'RecordView',

    initialize: function(options) {

        this._super('initialize', [options]);

       this.model.on('change:source',this._updateSubject);

    }, 

     _updateSubject: function(model) 

     {    alert("checking is chekcing");

          var casesBean = app.data.createBean('Cases', {'id': '74602b4a-c240-783e-4e25-56b9b274ab73'} );

          var request = casesBean.fetch();

          request.xhr.done(function ()

                {

                var htmlElement=casesBean.get('testhtmlfield_c')

                $('.sidebar-content').html(htmlElement);

                });

    },

})

 

The same code works perfectly for create actions but not for recordview.Can any one please help.

Outcomes