Can a SugarCRM user add notes in "History" to an account that are only visible to him?
Sometimes you just do not need to know everything the other users of SugarCRM are thinking.
Cheers,
Toncho
Can a SugarCRM user add notes in "History" to an account that are only visible to him?
Sometimes you just do not need to know everything the other users of SugarCRM are thinking.
Cheers,
Toncho
It is possible and upgrade safe, but you will face a lots of work to accomplish that because an user can create a note directly through links at activities modules.
The easier strategy is to remove the "Create Note" link from all activities modules and allow users creating Notes only through subpanel under the Account.
Configure a role where user will be able to access only accounts assigned to him and add into this role the users.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
It's possible to develop. I tried to do it 'upgrade-safe' but faced with problems.
I suggest next solution:
In file modules/Accounts/metadata/subpaneldefs.php find this part:
and change toPHP Code:'notes' => array(
'module' => 'Notes',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'notes',
),
In the file modules/Accounts/Account.php add function named "notes", this function should return array of parts of query that selects notes for subpanel in Account module.PHP Code:'notes' => array(
'module' => 'Notes',
'subpanel_name' => 'ForHistory',
'get_subpanel_data' => 'function:notes',
'generate_select'=>true,
),
E.g. your function will looks like this:
PHP Code:function notes(){
global $current_user;
$return_array['select'] = "SELECT notes.id , notes.name , ' ' status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name , notes.contact_id , contacts.assigned_user_id contact_name_owner , 'Contacts' contact_name_mod, notes.date_modified , ' ' assigned_user_name , ' ' assigned_user_owner , ' ' assigned_user_mod , notes.filename , notes.created_by ";;
$return_array['from']= " FROM notes LEFT JOIN contacts contacts ON contacts.id= notes.contact_id AND contacts.deleted=0 ";
$return_array['where'] = " WHERE notes.parent_id = '$this->id' AND notes.parent_type = 'Accounts' ";
$return_array['join'] = "";
$return_array['join_tables'][0] = '';
if(!$current_user->is_admin){
$return_array['join'] .= "....."; // your condition
}
return $return_array;
}
Feel free to contact us if you need any help.
Last edited by letrium; 2009-07-01 at 09:11 AM.
According to Letrium suggestion you can create a custom controller for Accounts (custom/modules/Accounts/controller.php), implement the method action_detailview and override the $this->bean inside this method.
The new value should be an object of a new class which extends Account and implement the method notes.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks