1. I have created custom button called "SUBMIT" on module. (Working Fine)
2. I was trying to implement simple alert message on click of that button.
Process Followed:
Extend and override the record view controller:
./custom/modules/Accounts/clients/base/views/record/record.js
Code:
({
extendsFrom: 'RecordView',
initialize: function (options) {
this._super('initialize', [options]);
//add listener for custom button
this.context.on('button:submit_button:click', this.submit_button, this);
},
submit_button: function() {
app.alert.show('submit-ok', {
level: 'success',
messages: 'Submitting Your Order .....',
autoClose: true
});
}
})
Please help with me with the correct approach .