Hi Team,
How can i override save button call. I want to right some logic at client side on click of save button.
What is the correct way of doing it.
Regards,
Deepak
Hi Team,
How can i override save button call. I want to right some logic at client side on click of save button.
What is the correct way of doing it.
Regards,
Deepak
Hi Deepak Kumar
Which version you are using ??
Hi Mehul Bhandari,
Sugar CRM 7.7.1 version.
Hi Deepak Kumar
create file on below place.
custom/modules/<MODULE NAME>/clients/base/views/create/create.js
({
extendsFrom: 'CreateView',
initialize: function (options) {
this._super('initialize', [options]);
this.context.on('button:save_button:click', this._save_desc, this);
},
_save_desc: function (model) {
console.log("Mehul Bhandari");
},
})
custom/modules/<MODULE NAME>/clients/base/views/record/record.js
({
extendsFrom: 'RecordView',
initialize: function (options) {
this._super('initialize', [options]);
this.context.on('button:save_button:click', this._save_desc, this);
},
_save_desc: function (model) {
console.log("Mehul Bhandari");
},
})
Hope this Helpful to you...
I want to add my functionality to the existing save functionality by doing this.
For example if i put alert in the function like above.
I get the alert first and then the parent save function gets executed.
I want the save to do it work first and then do my functionality which i write in my function
Regards
Sidhu
I want to add my functionality to the existing save functionality by doing this.
For example if i put alert in the function like above.
I get the alert first and then the parent save function gets executed.
I want the save to do it work first and then do my functionality which i write in my function
Regards
Sidhu
Hi sidhu sidhu
You can write after_save logic Hook for this..
If you want anything else then let me know.