In the list view of the Leads module, I want to override the action of the preview button next to each record so that clicking on it opens up the preview pane as well as putting the selected row into edit mode.
Platform: Sugar ondemand version 11.1
I am able to override the preview button as below but how do I trigger the 'Edit' action, as if I had clicked on the 'Edit' from the dropdown list next to the preview button?
// custom/modules/Leads/clients/base/views/recordlist.js
*/
({
extendsFrom: 'RecordlistView',
initialize: function(options) {
this._super("initialize", [options]);
this.context.on('list:preview:fire', this.preview_clicked, this);
},
preview_clicked: function(model) {
console.log('Preview button clicked');
//??? trigger/call the editrow action ???
},