Create a new view in one customized module

Hi there,

I’m new to the Suitecrm. I created a new module(for person record), and added one button on the left menu of the module to realize a new action.

What I need is that when someone click on that button, there will be another customized view displayed in the system.

However, I don’t know how to create this view, and how to write code to connect this button with the view.

Can anybody help me with this?

I have a bookmark for this example:

Part 1
https://gist.github.com/pgorod/5de7c6f8d37413654b16e06668d7e1b1
Part 2
https://gist.github.com/pgorod/c838f258fadf9528b61183e763e978a8

But you have already added the List view menu item? How did you do that, was it the same as in this example?

Tip: instead of creating a new “person” module, do your changes in the Contacts module, if possible. You will find this module is integrated into the rest of SuiteCRM in a 100 different ways, and it will probably be useful for you.

Thanks for your help, but that’s not what I want.
I want to create a new list view, and keep the old one.

I created the a menu button on the left.

Just like:
Create
Create from vcard
view
import

And the code is here(the action name is covert):

<?php 
 //WARNING: The contents of this file are auto-generated



    $module_menu[]=array('index.php?module=a1234_linkedin&action=convert', 'Query Linkedin','View','a1234_linkedin');


?>

I just don’t know where to create a new list view, and also keep the old one. And how can I link my action with this new list view?

There is more than one mechanism that SuiteCRM uses to get the view files from the URL. Sometimes it just looks for the view name in a PHP file with that same name inside the module dir.

Other times it uses a controller file.

Maybe read this for some background

https://alanstorm.com/sugar_crm_hello_world/