Results 1 to 3 of 3

Thread: Lock editing of notes for converted Leads

  1. #1
    ncarp is offline Junior Member
    Join Date
    Nov 2010
    Posts
    3

    Question Lock editing of notes for converted Leads

    Hello Everyone

    I am trying to figure out how I can lock adding notes to converted leads for all users. The reason for this is we want to force all notes to be added in the contact page once it has been converted.

    Any ideas?

    Thanks

  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: Lock editing of notes for converted Leads

    You need to create a view.detail.php for Leads and implement the methods


    PHP Code:
        function displaySubPanels() {
            if (isset(
    $this->bean) && !empty($this->bean->id) && (file_exists('modules/' $this->module '/metadata/subpaneldefs.php') || file_exists('custom/modules/' $this->module '/metadata/subpaneldefs.php') || file_exists('custom/modules/' $this->module '/Ext/Layoutdefs/layoutdefs.ext.php'))) {
            
                
    $layout_def_override $this->open_layout_defs($this->module);

                if(
    $this->bean->converted == 1) {
                    foreach(
    $layout_def_override['subpanel_setup'] as $sub_name => $sub_defs){
                        if(
    $sub_defs['module'] == 'History') {
                            foreach(
    $layout_def_override['subpanel_setup'][$sub_name]['top_buttons'] as $button_id => $button_defs) {
                                if(
    $button_defs['widget_class'] == 'SubPanelTopCreateNoteButton') {
                                    unset(
    $layout_def_override['subpanel_setup'][$sub_name]['top_buttons'][$button_id]);
                                }
                            }
                        }
                    }
                }

                
    $GLOBALS['focus'] = $this->bean;

                require_once (
    'include/SubPanel/SubPanelTiles.php');

                
    $subpanel = new SubPanelTiles($this->bean$this->module$layout_def_override);
                echo 
    $subpanel->display();
            }
        }

        function 
    open_layout_defs $layout_def_key '' $original_only false ) {
            
    $layout_defs $this->bean->module_dir ] = array ( ) ;
            
    $layout_defs $layout_def_key ] = array ( ) ;

            if (
    file_exists 'modules/' $this->bean->module_dir '/metadata/subpaneldefs.php' )) {
                require (
    'modules/' $this->bean->module_dir '/metadata/subpaneldefs.php') ;
            }
            if (! 
    $original_only && file_exists 'custom/modules/' $this->bean->module_dir '/Ext/Layoutdefs/layoutdefs.ext.php' )) {
                
                require (
    'custom/modules/' $this->bean->module_dir '/Ext/Layoutdefs/layoutdefs.ext.php') ;
            
            }
            
            if (! empty ( 
    $layout_def_key )) {
                
    $layout_defs $layout_defs $layout_def_key ] ;
            } else {
                
    $layout_defs $layout_defs $this->bean->module_dir ] ;
            }

            return 
    $layout_defs;
        
        } 
    Perhaps you have to modify something, but that is the idea.

    Regards
    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
    ncarp is offline Junior Member
    Join Date
    Nov 2010
    Posts
    3

    Default Re: Lock editing of notes for converted Leads

    Thanks a bunch!

    What directory should I put this file in?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-01-17, 08:10 PM
  2. Migrating Converted Lead notes
    By pramodhc in forum Help
    Replies: 1
    Last Post: 2007-01-12, 09:02 PM
  3. Replies: 0
    Last Post: 2006-02-21, 06:19 PM
  4. Replies: 0
    Last Post: 2005-01-28, 08:01 PM
  5. Replies: 0
    Last Post: 2005-01-28, 07:59 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
  •