Results 1 to 4 of 4

Thread: full form view of Notes subpanel in Contact module

  1. #1
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Question full form view of Notes subpanel in Contact module

    Hi every one,

    i want to open full form view instead of quickcreate view whenever "create note & attachment" button is press in history sub panel of Contact module..

    so please help me


    thanks in advanced
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: full form view of Notes subpanel in Contact module

    You need to copy the file include/generic/SugarWidgets/SugarWidgetSubPanelTopCreateNoteButton.php to a new one.
    Rename the class name according to file name and make the class extends the class SugarWidgetSubPanelTopButton instead of the SugarWidgetSubPanelTopButtonQuickCreate.
    Then you need to update the layoutdefs to set the new widget as the Notes button .

    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.

  3. #3
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    270

    Question Re: full form view of Notes subpanel in Contact module

    Thanks a lot.. i tried it but cant able to solve my problem.. i write my code like ds in SugarWidgetSubPanelTopCreateNoteffButton.php which is new file:
    PHP Code:
    require_once('include/generic/SugarWidgets/SugarWidgetSubPanelTopButton.php');

    class 
    SugarWidgetSubPanelTopCreateNoteffButton extends SugarWidgetSubPanelTopButton
    {
        function &
    _get_form($defines$additionalFormFields null)
        {
        
            global 
    $app_strings;
            global 
    $currentModule;

            
    $this->module="Notes";
            
    $this->subpanelDiv "history";

            
    // Create the additional form fields with real values if they were not passed in
            
    if(empty($additionalFormFields) && $this->additional_form_fields)
            {
                foreach(
    $this->additional_form_fields as $key=>$value)
                {
                    if(!empty(
    $defines['focus']->$value))
                    {
                        
    $additionalFormFields[$key] = $defines['focus']->$value;
                    }
                    else
                    {
                        
    $additionalFormFields[$key] = '';
                    }
                }
            }
            
            if(!empty(
    $this->module))
            {
                
    $defines['child_module_name'] = $this->module;
            }
            else
            {
                
    $defines['child_module_name'] = $defines['module'];
            }

            if(!empty(
    $this->subpanelDiv))
            {
                
    $defines['subpanelDiv'] = $this->subpanelDiv;
            }

            
    $defines['parent_bean_name'] = get_class$defines['focus']);

            
    $form 'form' $defines['child_module_name'];
            
    $button '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' strtolower($defines['subpanelDiv']) . '\', \'' addslashes($app_strings['LBL_LOADING']) . '\', \'' strtolower($defines['subpanelDiv']) . '\');" action="index.php" method="post" name="form" id="form' $form "\">\n";

            
    //module_button is used to override the value of module name
            
    $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n";
            
    $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n";

            if(isset(
    $defines['focus']->name))
            {
                
    $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>";
            }

            
    $button .= '<input type="hidden" name="to_pdf" value="true" />';
            
    $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />';
            
    $button .= '<input type="hidden" name="return_module" value="' $currentModule "\" />\n";
            
    $button .= '<input type="hidden" name="return_action" value="' $defines['action'] . "\" />\n";
            
    $button .= '<input type="hidden" name="return_id" value="' $defines['focus']->id "\" />\n";
             
            
    // TODO: move this out and get $additionalFormFields working properly
            
    if(empty($additionalFormFields['parent_type']))
            {
                if(
    $defines['focus']->object_name=='Contact') {
                    
    $additionalFormFields['parent_type'] = 'Accounts';
                }
                else {
                    
    $additionalFormFields['parent_type'] = $defines['focus']->module_dir;
                }
            }
            if(empty(
    $additionalFormFields['parent_name']))
            {
                if(
    $defines['focus']->object_name=='Contact') {
                    
    $additionalFormFields['parent_name'] = $defines['focus']->account_name;
                    
    $additionalFormFields['account_name'] = $defines['focus']->account_name;
                }
                else {
                    
    $additionalFormFields['parent_name'] = $defines['focus']->name;
                }
            }
            if(empty(
    $additionalFormFields['parent_id']))
            {
                if(
    $defines['focus']->object_name=='Contact') {
                    
    $additionalFormFields['parent_id'] = $defines['focus']->account_id;
                    
    $additionalFormFields['account_id'] = $defines['focus']->account_id;
                }
                else {
                    
    $additionalFormFields['parent_id'] = $defines['focus']->id;
                }
            }

            
    $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' "\n";
            
    $button .= '<input type="hidden" name="module" value="Home" />' "\n";
            
    $button .= '<input type="hidden" name="target_action" value="EditView" />' "\n";
            
            
    // fill in additional form fields for all but action
            
    foreach($additionalFormFields as $key => $value)
            {
                if(
    $key != 'action')
                {
                    
    $button .= '<input type="hidden" name="' $key '" value="' $value '" />' "\n";
                }
            }

            return 
    $button;
        }    
            
    }
    ?> 
    so pls help..
    Last edited by akkimca; 2009-06-30 at 08:28 AM.
    Regards
    ==========================
    akkimca
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: akshay.biztech

  4. #4
    japtone is offline Senior Member
    Join Date
    Nov 2010
    Posts
    49

    Default Re: full form view of Notes subpanel in Contact module

    I'm interested in doing this under the one of my modules and i'm wondering if anyone has solved or figured out how to do it?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2010-09-03, 07:41 PM
  2. Replies: 0
    Last Post: 2009-06-29, 12:13 PM
  3. Replies: 0
    Last Post: 2008-08-05, 02:23 PM
  4. Lead Id not populating into Full Form of Subpanel !
    By veon in forum Developer Help
    Replies: 0
    Last Post: 2008-01-31, 11:58 AM
  5. Replies: 0
    Last Post: 2007-02-20, 11:00 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
  •