I have been wondering how to change the account name in detail view of leads [in Sugar CRM] to a link when a lead has been converted to an account or atleast when the lead has an account_id. A forum i have been following [will post the link later] told me to change the /cache/module/Leads/DetailView.tpl and edit the line that displays the account name. But this would be reverted back everytime i redeploy the Leads Module. So its not really making sense to edit the cache files right?
I just found a way out today and it would be super useful to me in the future if i take this down. I have to edit the /custom/modules/Leads/metadata/detailviewdefs.php and add a custom code on the array that displays the account name.
'customCode' => '{if $fields.account_id}<a href="index.php?module=Accounts&action=DetailView&record={$fields.account_id.value}"><b>{$fields.account_name.value}</b></a>{else if}{$fields.account_name.value} {/if}',
This would take effect when you cleared the contents of /cache/modules/Leads
as the system would generate the new cache files.
I think that’s just it
when i want to do something in the detail view, i just have to edit the custom counterpart and delete the associated cache files
February 26, 2011 at 9:00 am
Not sure if you realize this, but I am viewing your site in Chrome, and the code you posted in the
tag cannot be viewed without looking at the source code of this page. Because the code is one big line of text, there is no place for the line to break. You might want to look into this if you’re going to be posting a lot of code on your blog.
But great snippet of info! Helped me on my project.