Confused: passing selected items submited by custom action

i’m coding a custom action in list view but i’m a bit confused regarding how to pass selected items into a new view with a custom template.

This is what i’ve done so far.

1. Create custom Action Button in ListView that points to custom Action

class sugo_ComputersViewList extends ViewList
* @see ViewList::preDisplay()
public function preDisplay()
$this->lv->actionsMenuExtraItems[] = $this->addMenuItem();
* @return string HTML
protected function addMenuItem()
global $app_strings;

    return <<<EOHTML

Create Job

2. Write my own Controller with test action

class sugo_ComputersController extends SugarController
function action_test(){
$GLOBALS[‘log’]->fatal(‘Am in Controller’);
$this->view = “test”;
if ( !empty($_REQUEST[‘uid’]) ) {
$recordIds = explode(’,’,$_REQUEST[‘uid’]);
foreach ( $recordIds as $recordId ) {
$bean = SugarModule::get($_REQUEST[‘module’])->loadBean();
echo “Sent Record ID {$bean->id}, name “.$bean->get_summary_text().””;

3. Write a custom action view that should render my custom template

class sugo_ComputersViewtest extends SugarView

public function preDisplay() {
    $this->dv->tpl = 'include/ListView/ListViewGeneric.tpl';
public function display()
    echo '<h1>Some other View</h1>';
    $GLOBALS['log']->fatal('Am in View');


Attached a screenshot with above code.

What i would achieve is passing selected items from listview to a test action intercepted by controller…
then render everything in the test view with my custom template.

First time for me so i’m a bit confused on this.

Appreciate any help.

Thank you very much


What exactly you are trying to do?

i need to select some items in a listview of my custom module.
Then passing all selected items into a new action(custom controller) that renders a view based on a custom smarty template.
Then i will do some custom logic on it.

Hope it is clear.