Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By kamalesh2008

Thread: custom module Subpanel not display in stantrad (Cmapaigns) module ????

  1. #1
    kamalesh2008 is offline Sugar Community Member
    Join Date
    Mar 2010
    Location
    Pune , India
    Posts
    46

    Thumbs up custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Hello All,

    my custom (IT_Student) module's Subpanel is not displaying in standard (Campaigns) module ????

    Problem statement: I want to establish a relation(one-to-many) in Campaigns(Stantrad module) and IT_Student(Coustom module).

    To do this i read http://www.jejik.com/articles/2008/1...ndard_modules/

    and i followed these steps:

    Step1:custom/Extension/modules/Campaigns/Ext/Language/en_us.IT_Student.php
    PHP Code:
    $mod_strings['LBL_IT_STUDENT_LIST'] = 'IT Student Lists'

    Step2:custom/Extension/modules/Campaigns/Ext/Vardefs/IT_Student.php
    PHP Code:
    $dictionary["Campaign"]["fields"]["campaigns_it_student"] = array (
      
    'name' => 'campaigns_it_student',
      
    'type' => 'link',
      
    'relationship' => 'campaigns_it_student',
      
    'source' => 'non-db',
      
    'vname' => 'LBL_IT_STUDENT_LIST',
    ); 
    Step3::custom/Extension/modules/Campaigns/Ext/Layoutdefs/IT_Student.php
    PHP Code:
    $layout_defs["Campaigns"]["subpanel_setup"]["campaigns_it_student"] = array (
      
    'order' => 100,
      
    'module' => 'IT_Student',
      
    'subpanel_name' => 'default',
      
    'sort_order' => 'asc',
      
    'sort_by' => 'id',
      
    'title_key' => 'LBL_IT_STUDENT_LIST',
      
    'get_subpanel_data' => 'campaigns_it_student',
      
    'top_buttons' => 
      array (
        
    => 
        array (
          
    'widget_class' => 'SubPanelTopCreateButton',
        ),
        
    => 
        array (
          
    'widget_class' => 'SubPanelTopSelectButton',
          
    'mode' => 'MultiSelect',
        ),
      ),
    ); 
    Step4::custom/Extension/modules/IT_Student/Ext/Language/en_us.lang.php

    PHP Code:
    $mod_strings['LBL_IT_STUDENT'] = 'Student'
    Step5::custom/Extension/modules/IT_Student/Ext/\Vardefs/IT_Student.php
    PHP Code:
    <?php

    $dictionary
    ["IT_Student"]["fields"]["campaigns_name"] = array (
      
    'name' => 'campaigns_name',
      
    'type' => 'relate',
      
    'source' => 'non-db',
      
    'vname' => 'LBL_IT_STUDENT',
      
    'save' => true,
      
    'id_name' => 'campaigns_id',
      
    'link' => 'campaigns_it_student',
      
    'table' => 'it_student',
      
    'module' => 'IT_Student',
      
    'rname' => 'name',
    );


    $dictionary["IT_Student"]["fields"]["campaigns_id"] = array (
      
    'name' => 'campaigns_id',
      
    'type' => 'link',
      
    'relationship' => 'campaigns_it_student',
      
    'source' => 'non-db',
    );

    $dictionary["IT_Student"]["fields"]["campaigns_it_student"] = array (
      
    'name' => 'campaigns_it_student',
      
    'type' => 'link',
      
    'relationship' => 'campaigns_it_student',
      
    'source' => 'non-db',
    );

    ?>
    Step6::custom/metadata/campaigns_it_studentMetaData.php
    PHP Code:
    $dictionary["campaigns_it_student"] = array (
      
    'true_relationship_type' => 'many-to-many',
      
    'relationships' => 
      array (
        
    'campaigns_it_student' => 
        array (
          
    'lhs_module' => 'Campaigns',
          
    'lhs_table' => 'campaigns',
          
    'lhs_key' => 'id',
          
    'rhs_module' => 'IT_Student',
          
    'rhs_table' => 'it_student',
          
    'rhs_key' => 'id',
          
    'relationship_type' => 'many-to-many',
          
    'join_table' => 'campaigns_it_student',
          
    'join_key_lhs' => 'campaigns_id',
          
    'join_key_rhs' => 'it_student_id',
        ),
      ),
      
    'table' => 'campaigns_it_student',
      
    'fields' => 
      array (
        
    => 
        array (
          
    'name' => 'id',
          
    'type' => 'varchar',
          
    'len' => 36,
        ),
        
    => 
        array (
          
    'name' => 'date_modified',
          
    'type' => 'datetime',
        ),
        
    => 
        array (
          
    'name' => 'deleted',
          
    'type' => 'bool',
          
    'len' => '1',
          
    'default' => '0',
          
    'required' => true,
        ),
        
    => 
        array (
          
    'name' => 'campaigns_id',
          
    'type' => 'varchar',
          
    'len' => 36,
        ),
        
    => 
        array (
          
    'name' => 'it_student_id',
          
    'type' => 'varchar',
          
    'len' => 36,
        ),
      ),
      
    'indices' => 
      array (
        
    => 
        array (
          
    'name' => 'campaigns_it_studentpk',
          
    'type' => 'primary',
          
    'fields' => 
          array (
            
    => 'id',
          ),
        ),
        
    => 
        array (
          
    'name' => 'idx_campaign_id',
          
    'type' => 'index',
          
    'fields' => 
          array (
            
    => 'campaigns_id',
          ),
        ),
        
    => 
        array (
          
    'name' => 'idx_it_student_id',
          
    'type' => 'alternate_key',
          
    'fields' => 
          array (
            
    => 'it_student_id',
          ),
        ),
      ),
    ); 
    Step6::custom/Extension/application/Ext/TableDictionary/campaigns_it_student.php
    PHP Code:
    include('custom/metadata/campaigns_it_studentMetaData.php'); 
    Step7::custom/application/Ext/TableDictionary/tabledictionary.ext.php
    PHP Code:
    include('custom/metadata/campaigns_it_studentMetaData.php'); 
    after doing above steps, i Rebuild Extensions and Relationships in admin panel.

    please help me out

    Thank you
    Kamlesh D
    sahay143 likes this.

  2. #2
    heta's Avatar
    heta is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Ahmedabad,India
    Posts
    214

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Hello Kamlesh,

    did u have a query to create new table "campaigns_it_student", when u ran quick repair & rebuild?
    Best Regards
    ---------------------------------------
    Heta Shah - iNET PROCESS
    heta.shah@inetprocess.com
    http://www.inetprocess.co.in
    Projects :
    iNETDocs -Project of the month(Dec-2008)
    iNETGoogleMap

  3. #3
    kamalesh2008 is offline Sugar Community Member
    Join Date
    Mar 2010
    Location
    Pune , India
    Posts
    46

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Hello Heta,


    Quote Originally Posted by heta View Post
    Hello Kamlesh,

    did u have a query to create new table "campaigns_it_student", when u ran quick repair & rebuild?

    Thank for reply, while i ran quick repair & rebuild then i got msg Differences found between database and vardefs

    Code:
    /* Table : campaigns_it_student */
    /* MISSING TABLE: campaigns_it_student */
    CREATE TABLE campaigns_it_student (id varchar(36)  NOT NULL ,
    date_modified datetime  NULL ,deleted bool  DEFAULT '0' NOT NULL
     ,campaigns_id varchar(36)  NULL ,it_student_id varchar(36)  NULL  
    , PRIMARY KEY (id),   KEY idx_campaign_id  (campaigns_id), 
      KEY idx_it_student_id (it_student_id)) 
    CHARACTER SET utf8 COLLATE utf8_general_ci;
    when i create this table in sugar database however it don't display in subpanel.

    Thank You
    Kamalesh D

  4. #4
    heta's Avatar
    heta is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Ahmedabad,India
    Posts
    214

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    hello kamlesh,

    Have u tried running rebuild extension?
    Rebuild extension then repair relationship too.
    Best Regards
    ---------------------------------------
    Heta Shah - iNET PROCESS
    heta.shah@inetprocess.com
    http://www.inetprocess.co.in
    Projects :
    iNETDocs -Project of the month(Dec-2008)
    iNETGoogleMap

  5. #5
    kamalesh2008 is offline Sugar Community Member
    Join Date
    Mar 2010
    Location
    Pune , India
    Posts
    46

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Quote Originally Posted by heta View Post
    hello kamlesh,

    Have u tried running rebuild extension?
    Rebuild extension then repair relationship too.
    Hello heta,

    it didn't work.

    i am attracting my custom module(IT_Student) and custom folder where i have made changes.
    It would be great if you will look at those files.

    Thank You
    Kamalesh D
    Attached Files Attached Files

  6. #6
    kamalesh2008 is offline Sugar Community Member
    Join Date
    Mar 2010
    Location
    Pune , India
    Posts
    46

    Thumbs up Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Quote Originally Posted by heta View Post
    hello kamlesh,

    Have u tried running rebuild extension?
    Rebuild extension then repair relationship too.
    hello heta,

    my sub-panel is displaying under tracker view but i want to be display under detail view.


    please help me.

    Thank You,
    Kamlesh D

  7. #7
    ctx2002 is offline Sugar Community Member
    Join Date
    Nov 2010
    Posts
    29

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Hi:

    Just read your post ,I know this is a very old post, but i have met same problem which an subpanel did not show up under campaigns module's detail view.

    I have found a solution for this, i am use sugarcrm 6.0

    open file module/Campaigns/views/view.detail.php.

    at line 115 , inside function display() ,

    foreach ($alltabs as $key=>$name) {
    if ($name != 'prospectlists' && $name!='emailmarketing' && $name != 'tracked_urls' && $name != 'campaigns_users') {
    //exclude subpanels that are not prospectlists, emailmarketing, or tracked urls
    $subpanel->subpanel_definitions->exclude_tab($name);
    }
    }


    see above the "if" statement, it hard coded to decide which panel is allowed to show.

    I have made a customized subpanel which is "campaigns_users", so we have to change that "if" statement to make that "campaigns_users" ($name != 'campaigns_users') to be displayed.

  8. #8
    sahay143 Guest

    Angry Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Quote Originally Posted by kamalesh2008 View Post
    hello heta,

    my sub-panel is displaying under tracker view but i want to be display under detail view.


    please help me.

    Thank You,
    Kamlesh D
    Hi Kamlesh and Heta,
    I am also trying to create the same thing in the campaign module. I have the custom module in my instance and I want to create the many to many relationship between the campaign module and the custom module, I followed this thread and the relationship is created well. I can see the Many-to-Many relationship in the studio in campaign module but there is no subpanel in the detail view for this custom module and custom relationship. I don't know why it is not coming.I did the same thing as mentioned in this thread.


    Looking forward for your reply......


    Thanks & Regards
    Sumit Sahay
    sumit143sweta@gmail.com

  9. #9
    rajanraji Guest

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    I am facing a similar issue

    i created a custom module ABC
    created a relationship and subpanel for ABC in campaigns
    I can see the relationship and subpanel in studio for campaigns

    i edited the view.detail.php tp show all tabs and removed the if condition. I can see all the subpanel except ABC

    I am stuck for a couple of days and would appreciate any help

    thanks
    raji

  10. #10
    sahay143 Guest

    Default Re: custom module Subpanel not display in stantrad (Cmapaigns) module ????

    Quote Originally Posted by rajanraji View Post
    I am facing a similar issue

    i created a custom module ABC
    created a relationship and subpanel for ABC in campaigns
    I can see the relationship and subpanel in studio for campaigns

    i edited the view.detail.php tp show all tabs and removed the if condition. I can see all the subpanel except ABC

    I am stuck for a couple of days and would appreciate any help

    thanks
    raji
    Hi Raji,
    Did you get the solution?????

    Thanks & Regards
    Sumit Sahay

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. subpanel display order in project module
    By anjireddy987 in forum Help
    Replies: 14
    Last Post: 2013-11-28, 04:20 PM
  2. Replies: 1
    Last Post: 2009-08-07, 11:38 AM
  3. Addition of custom module as a subpanel to Contacts module
    By jchinnasamy in forum Developer Help
    Replies: 1
    Last Post: 2008-10-29, 11:48 PM
  4. Subpanel Display For New Module
    By prabukanth in forum Developer Help
    Replies: 0
    Last Post: 2008-10-13, 02:47 PM
  5. Replies: 2
    Last Post: 2008-09-24, 10:34 AM

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
  •