How to call js function on record view of custom field
You can add some events in record.js or recordlist.js like:
({
extendsFrom: 'RecordlistView', // or RecordView
initialize: function (options) {
this._super("initialize", arguments);
this.events = _.extend({}, this.events, {
'click [name="some_button_name_of_fieldname"]':'SomeFunction'
});
this.context.on('list:some_button_name_of_fieldname:fire', this.SomeFunction, this);
}
// ...
})
not works for me..
i have one dropdown name ex lead_field , on value change need to call function and get that selected dropdown value.
not works for me..
i have one dropdown name ex lead_field , on value change need to call function and get that selected dropdown value.
So, practically you have an event like?
this.events = _.extend({}, this.events, {
'change [name="lead_field"]':'CallSomeFunction'
});