Extend frappe.ui.form.SuccessAction

Hi all,

I am trying to Extend the SuccessAction but returning error is not a Function!
What am i not doing well please ?

frappe.ui.form.SuccessAction = frappe.ui.form.SuccessAction.$extend({
get_actions: function() {
console.log(‘Actions to done…’);
}
});

Here is the solution

frappe.ui.form.SuccessAction = class SuccessAction extends frappe.ui.form.SuccessAction{
get_actions: function() {
console.log(‘Actions to done…’);
}
};

hi @Helio_Jesus
I am trying to Extend the PrintPreview but it not working!

Hi,
I have also tried and did not work…
But what is that you want to control or do when PrintPreview is called ?

i want create more options here and add event for it

If on V13 or V14 try to check override_doctype_class and override with yours…
I’m still on v12 and moving slowly to V13 where i have already implemented some override_doctype_class

1 Like