Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By neel1154

Thread: Having custom module appear in activities/history like Calls, meetings or Notes

  1. #1
    formula911 is offline Junior Member
    Join Date
    Sep 2011
    Posts
    3

    Default Having custom module appear in activities/history like Calls, meetings or Notes

    Hi,

    I'm currently trying to create a custom module that when associated with an account, would be tracked under activities and history subpanels. I know I can't do this from Studio, is this possible with coding? Has anyone else accomplished this?

    Thanks!

    Andrew

  2. #2
    neel1154's Avatar
    neel1154 is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Pune, Maharashtra, India
    Posts
    301

    Default Re: Having custom module appear in activities/history like Calls, meetings or Notes

    Hi Andrew,
    Go to admin/dropdown editor

    find parent_type_display

    Add "Module's name" as key and value as Module's Label. and save. You will get your custom module in that dropdown.

  3. #3
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    1,382

    Default Re: Having custom module appear in activities/history like Calls, meetings or Notes

    (1) Create a Subpanel for your module (one for Activities, one for History with different filters e.g. on status like calls and meetings do it)
    (2) ensure the fields map the activities and history subpanel (afaik this is taken from meetings)
    (3) activities and history subpanels are collection subpanels. Add your subpanel into the collection

    I don't think that this can be done with Studio but with normal customizing you can do it.

    christian.

    Quote Originally Posted by formula911 View Post
    Hi,

    I'm currently trying to create a custom module that when associated with an account, would be tracked under activities and history subpanels. I know I can't do this from Studio, is this possible with coding? Has anyone else accomplished this?

    Thanks!

    Andrew

  4. #4
    crmwa_alexon Guest

    Default Re: Having custom module appear in activities/history like Calls, meetings or Notes

    Hello guys,

    I have the same issue..

    I created a custom module(cstm_Test) and I want every time I add new record it display to "Account module" History subpanel.

    In my modules/<custom_module>/metadata/subpanels, I added ForHistory.php

    Here is my codes..

    $subpanel_layout = array(

    'where' => "(cstm_test.status='Held' OR cstm_test.status='Not Held')",


    'list_fields' => array(
    'object_image'=>array(
    'vname' => 'LBL_OBJECT_IMAGE',
    'widget_class' => 'SubPanelIcon',
    'width' => '2%',
    ),
    'name'=>array(
    'vname' => 'LBL_NAME',
    'widget_class' => 'SubPanelDetailViewLink',
    'width' => '30%',
    ),
    'status'=>array(
    'widget_class' => 'SubPanelActivitiesStatusField',
    'vname' => 'LBL_STATUS',
    'width' => '15%',
    'force_exists'=>true //this will create a fake field in the case a field is not defined
    ),
    'parent_id'=>array(
    'usage'=>'query_only',
    'force_exists'=>true
    ),
    'parent_type'=>array(
    'usage'=>'query_only',
    'force_exists'=>true
    ),
    'date_modified'=>array(
    'vname' => 'LBL_DATE_MODIFIED',
    'width' => '10%',
    ),
    'date_entered'=>array(
    'vname' => 'LBL_DATE_ENTERED',
    'width' => '10%',
    ),
    'assigned_user_name' => array (
    'name' => 'assigned_user_name',
    'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
    'widget_class' => 'SubPanelDetailViewLink',
    'target_record_key' => 'assigned_user_id',
    'target_module' => 'Employees',
    'width' => '10%',
    ),
    'edit_button'=>array(
    'vname' => 'LBL_EDIT_BUTTON',
    'widget_class' => 'SubPanelEditButton',
    'width' => '2%',
    ),
    'remove_button'=>array(
    'vname' => 'LBL_REMOVE',
    'widget_class' => 'SubPanelRemoveButton',
    'width' => '2%',
    ),
    ),
    );

    But without any luck it's not working.

    and also I customize modules/Accounts/metadata/subpaneldefs.php ..

    Here is my codes..

    'history' => array(
    'order' => 20,
    'sort_order' => 'desc',
    'sort_by' => 'date_entered',
    'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
    'type' => 'collection',
    'subpanel_name' => 'history', //this values is not associated with a physical file.
    'header_definition_from_subpanel'=> 'meetings',
    'module'=>'History',

    'top_buttons' => array(
    array('widget_class' => 'SubPanelTopCreateNoteButton'),
    array('widget_class' => 'SubPanelTopArchiveEmailButton'),
    array('widget_class' => 'SubPanelTopSummaryButton'),
    ),

    'collection_list' => array(
    'tasks' => array(
    'module' => 'Tasks',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'tasks',
    ),
    'meetings' => array(
    'module' => 'Meetings',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'meetings',
    ),
    'calls' => array(
    'module' => 'Calls',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'calls',
    ),
    'notes' => array(
    'module' => 'Notes',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'notes',
    ),
    'emails' => array(
    'module' => 'Emails',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'emails',
    ),
    'linkedemails' => array(
    'module' => 'Emails',
    'subpanel_name' => 'ForUnlinkedEmailHistory',
    'get_subpanel_data' => 'function:get_unlinked_email_query',
    'generate_select'=>true,
    'function_parameters' => array('return_as_array'=>'true'),
    ),

    /* MY CODE */
    'cstm_test' => array(
    'module' => 'cstm_Test',
    'subpanel_name' => 'ForHistory',
    'get_subpanel_data' => 'cstm_test',
    ),
    )
    ),


    Thanks in advance.

    Alexon.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Add activities and history subpanel to custom module
    By nielsentm in forum Developer Help
    Replies: 4
    Last Post: 2012-12-13, 02:57 PM
  2. Calls and Meetings in Activities
    By mrauch in forum Help
    Replies: 6
    Last Post: 2010-03-23, 11:24 PM
  3. Replies: 9
    Last Post: 2009-05-25, 10:47 AM
  4. custom field in activities(meetings, calls, tasks)
    By sugarcare in forum Developer Help
    Replies: 3
    Last Post: 2009-01-30, 03:24 AM
  5. Closing Calls/Meetings/To-dos: History/Notes & Follow-ups
    By heytimc in forum Feature Requests
    Replies: 1
    Last Post: 2008-06-20, 06:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •