Pass Data from pop_up to a controller or an api endpoint.

Hi all, I'm on Sugar CRM 6.5

I have a module with a custom action shortcut.  The shortcut button has a onclick() event which runs a open_popup('GDLF_Gandalf_Table','600','400','',false,false,{ 'call_back_function':'set_return_and_save_targetlist', 'form_name':'targetlist_form','field_to_name_array':{'id':'prospect_list'}, 'passthru_data':{'do_contacts' : 1 } } );

I'd like to send the selected ID and the id of the GDL_GANDALF_Table that was picked to a controller or an API end point.

Anyone have any ideas?

Thank you.

Parents
  • Resolved this by creating a AccountListViewSmarty.php in the module folder.  Created a pop up with:

    input.setAttribute ( 'name' , 'action' );
    input.setAttribute ( 'value' , 'CustomAction' );
    input.setAttribute ( 'type' , 'hidden' );

    This indicates that the form will be handled by a Sugar action which needs to be defined in /include/MVC/Controller

    $action_file_map['CustomAction'] = 'custom/modules/Custom_Module/CustomAction.php';

    Then you can create the file /custom/modules/Custom_Module/CustomAction.php.

    All posted attributes can be found at $_POST;

Reply
  • Resolved this by creating a AccountListViewSmarty.php in the module folder.  Created a pop up with:

    input.setAttribute ( 'name' , 'action' );
    input.setAttribute ( 'value' , 'CustomAction' );
    input.setAttribute ( 'type' , 'hidden' );

    This indicates that the form will be handled by a Sugar action which needs to be defined in /include/MVC/Controller

    $action_file_map['CustomAction'] = 'custom/modules/Custom_Module/CustomAction.php';

    Then you can create the file /custom/modules/Custom_Module/CustomAction.php.

    All posted attributes can be found at $_POST;

Children
No Data