Results 1 to 2 of 2

Thread: Custom button in detail view 5.5

  1. #1
    thamim is offline Member
    Join Date
    Apr 2010
    Posts
    11

    Default Custom button in detail view 5.5

    Hi all

    Please help, I am having trouble trying to add a custom button in detail view of a custom module in version 5.5. I created a file custom/modules/<modulename>/metadata/detailviewdefs.php and here is the code in the file
    PHP Code:
    <?php
    $module_name 
    'Shipping';
    $_object_name 'shipping';
    $viewdefs [$module_name] =
    array (
      
    'DetailView' =>
      array (
        
    'templateMeta' =>
        array (
          
    'buttons' => array(
            
    'EDIT',
            
    'DUPLICATE',
            
    'DELETE',
            
    'FIND DUPLICATE',
            array(
                    
    'customCode' => '<input title="TCPDF" class="button" onclick="some code here" type="submit" name="TCPDF" value="TCPDF">'
            
    ),
          ),
    ...
    I've done repair several time but nothing, what am I missing?

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Custom button in detail view 5.5

    Hi,

    Yes, you are missing an array declaration.
    The button's array should be inside the array called 'form' e.g.

    PHP Code:
    array (
      
    'DetailView' => 
      array (
        
    'templateMeta' => 
        array (
          
    'form' => 
          array (
            
    'buttons' => 
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom Detail View Button working issue with functions
    By chrislynch8 in forum Developer Help
    Replies: 3
    Last Post: 2010-11-25, 03:54 AM
  2. Replies: 1
    Last Post: 2010-05-26, 03:17 PM
  3. Replies: 0
    Last Post: 2009-09-03, 03:28 AM
  4. Lead detail view button control locations
    By routledge in forum Help
    Replies: 3
    Last Post: 2009-07-15, 11:24 PM
  5. Adding a custom button to top of Detail view in Sugar 5
    By mipapage in forum Developer Help
    Replies: 10
    Last Post: 2007-12-19, 08:37 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
  •