Hello,
We are wondering if someone knows of to extend the core action button to define a custom action ; for instance, how to call a custom code, eventually with some parameters.
Many thanks for your help,
Fred
Hello,
We are wondering if someone knows of to extend the core action button to define a custom action ; for instance, how to call a custom code, eventually with some parameters.
Many thanks for your help,
Fred
Question: Given that you are looking to customise anyway, why don't you add a completely custom button then? It could call your API or do whatever you need to.
It might be easier than attempting to try to extend Action Button, which I feel might become brittle with upgrades as well.
--
Enrico Simonetti
Sugar veteran (from 2007)
Feel free to reach out for consulting regarding:
All active SugarCRM certifications
Actively working remotely with customers based in APAC and in the United States
Hi Enrico Simonetti ,
we know how to create custom button with custom code.
But with the new and very cool actionbutton feature, it would be great to define button the same way, with a setting screen but also benefit the actionbutton settings (embed the button in the header or the record layout, the list layout, the focus drawer layout etc.).
So without re-code everything, I was looking for a way to extend core actionButton to define my new action.
Fred
Hi Frédéric Rinaldi ,
I agree with András Tőkés .
Honestly, I don't think action buttons have been built with custom extensibility in mind, hence why my suggestions. But I am more than happy to be proven wrong if you want to attempt this! You are better off asking for a feature request to Sugar.
For example, some of the components that come to mind are:
All the above are a mix of layouts, views and plugins, which in themselves are not easy to extend. You could override them, and then lose any future upgrades coming from Sugar on this functionality.
Feel free to have a look at all the files with a quick code grep:
grep -Ri "actionbutton" . | grep -v "min" | grep -v "Minified" | grep -v "lang.php" | grep -v ".md5" | grep -v "autoload_" | grep -v "cache"
and you will see what I mean...
I believe this approach would just be looking for troubles.
Good luck!
--
Enrico Simonetti
Sugar veteran (from 2007)
Feel free to reach out for consulting regarding:
All active SugarCRM certifications
Actively working remotely with customers based in APAC and in the United States
Hi Enrico Simonetti and András Tőkés ,
thank you for your feedback, even if they are not the one I was hoping for (but unfortunatelly the one I was imagining after our first investigation).
Today we are tricking the actionButton by using them to set up custom trigger field to run my custom hook...but it is a workarround that I was hoping to remove by a proper override.
Thanks for your time and have a great day,
Fred
Hi Enrico Simonetti and András Tőkés ,
thank you for your feedback, even if they are not the one I was hoping for (but unfortunatelly the one I was imagining after our first investigation).
Today we are tricking the actionButton by using them to set up custom trigger field to run my custom hook...but it is a workarround that I was hoping to remove by a proper override.
Thanks for your time and have a great day,
Fred