Hello! I need to create a custom action for a custom moduleās on List View.
I put the code
$this->lv->actionsMenuExtraItems[] = $this->myFunction();
inside preDisplay function and I made my function. In the controller I did $_REQUEST[āuidā] to get the idās of the records but I noticed I canāt get all the records from āall selectedā checkbox.
How can I get the list of selected IDs (Select All included) from my JS code?
Thanks.
I see what you mean the JavaScript doesnāt send the idās of the entire list but what it does send is a parameter $_REQUEST[āselect_entire_listā] if you select all itās set to 1 other wise 0 so you can use this to determine if all records have been selected.
You can then use this $Bean->get_full_list(āā,āname = āSomethingā AND choix_loc = āSomethingElseāā); to get all the records and do what ever you need to do.
https://developer.sugarcrm.com/2012/11/12/getting-a-set-of-beans-by-conditions-without-sql
This may also be helpful for what you are trying to do.
https://developer.sugarcrm.com/2010/11/22/howto-adding-your-own-listview-action-items