AnsweredAssumed Answered

Creating Calls from subpanel takes parent_name as Contact name instead of Call Subject

Question asked by Mukta Patel on Oct 29, 2014
Latest reply on Oct 30, 2014 by Mukta Patel
I have a custom module that actually stores all activities (calls,meetings,emails and tasks) so that we can create report from a single module.

When I create a task or other activity from edit view it stores it properly however whenever I do the same from subpanel it actually stores parent record
Eg : If I create task named "Sales Meeting" from Contact named "John Cena" it stores contact name instead of task subject.

Actually the parent_id and parent_type are stored of Contacts module .

Below is my vardef definition

$dictionary['user_activity']['fields']['parent_name'] = array(
'name'=> 'parent_name',
    'parent_type'=>'record_type_display' ,
    'options'=> 'parent_type_display',
$dictionary['user_activity']['fields']['parent_type'] = array(
    'type' => 'parent_type',
    'options'=> 'parent_type_display',
    'comment' => 'The Sugar object to which the call is related',
    'options' => 'parent_type_display',

$dictionary['user_activity']['fields']['parent_id'] = array(
  'name' => 'parent_id',
    'type' => 'id',
    'comment' => 'The ID of the parent Sugar object identified by parent_type'

$dictionary['user_activity']['fields']['contacts'] = array(
'name' => 'contacts',
'type' => 'link',
'relationship' => 'user_activity_contacts',

$dictionary['user_activity']['relationships']['user_activity_contacts'] = array(
'rhs_module'    => 'user_activity',
'rhs_table'    => 'user_activity',
'rhs_key'    => 'parent_id',
'lhs_module'    => 'Contacts',
'lhs_table'    => 'contacts',
'lhs_key'    => 'id',
'relationship_type'    => 'one-to-many',