SugarCRM 7 — Adding an action to the listview
There doesn’t appear to be a documented way to do this but in SugarCRM 7 this is how I’ve added actions to the listview. For this example it’s showing how to add a button to an animal module, which adds the animal to a related circus event. 1. Adding thebutton This first thing you need to do is copy the global recordlist.php file into your module and create a custom recordlist.php which overrides the existing one. You can copy the base one SugarCRM has or simply take this file below and alter the add_to_circus button. Note the addtocirus:fire action, we will create javascript code that is called when this event is fired. This code should go into custom/module/animals/clients/base/views/recordlist/recordlist.php ...