SugarCRM: Make other field in Listview as a link to Detailview

Sometimes you dont need to use the name in a module as a link in Listview to redirect you to the Detailview of the record. If you want to set other fields in Listview as the link that will redirect you to Detailview, then follow this simple steps:

1. Go to custom/modules/<MODULE_NAME>/metadata/listviewdefs.php (If not existing, copy file from modules/<MODULE_NAME>/metadata/listviewdefs.php)
2. Find the field name that you want to make as the link. For example, use Billing City. It will look something like this:

'BILLING_ADDRESS_CITY' =>
array (
'width' => '10%',
'label' => 'LBL_LIST_CITY',
'default' => true,
),

3. You need to add the the link attribute and set it to true.

'BILLING_ADDRESS_CITY' =>
array (
'width' => '10%',
'label' => 'LBL_LIST_CITY',
'link' => true,
'default' => true,
),

* If you want to make the name just plain text, comment the link attribute of the field in the same file.
4. Run Quick Repair and Rebuild in Administration page.

This is an upgrade safe way of making a field as a link to go to Detailview.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s