Results 1 to 2 of 2

Thread: How to use a viewdefs file in a view ?

  1. #1
    Cedric K is offline Senior Member
    Join Date
    Sep 2010
    Posts
    155

    Question How to use a viewdefs file in a view ?

    Hello,

    I have successfully created a view including the following files :

    custom/modules/Users/controller.php
    custom/modules/Users/views/view.editsummary.php
    custom/modules/Users/tpl/editSummary.tpl
    custom/modules/Users/metadata/editsummarydefs.php
    PHP Code:
    echo "ok";

    $editsummaryDefs ['Users'] = 
    array (
      
    'USER_NAME' => 
      array (
        
    'width' => '5%',
        
    'label' => 'LBL_USER_NAME',
        
    'link' => true,
        
    'default' => true,
      ),
    ); 

    However, the editsummarydefs file is ignored. My template file is well displayed but no fields from the defs file are displayed.

    I have also added this file :
    custom/modules/Users/metadata/metafiles.php
    PHP Code:
     $metafiles['Users'] = array(
        
    'editsummarydefs'  =>     'custom/modules/Users/metadata/editsummarydefs.php',     
     ); 
    Actually, I would like to include the assigned_user field in my view, that's why I need to define the editsummarydefs.php.

    What do you think is missing ?
    Thank you very much for any help.

  2. #2
    KETANBHALERAO is offline Sugar Community Member
    Join Date
    Sep 2011
    Location
    Pune
    Posts
    21

    Default Re: How to use a viewdefs file in a view ?

    Quote Originally Posted by Cedric K View Post
    Hello,

    I have successfully created a view including the following files :

    custom/modules/Users/controller.php
    custom/modules/Users/views/view.editsummary.php
    custom/modules/Users/tpl/editSummary.tpl
    custom/modules/Users/metadata/editsummarydefs.php
    PHP Code:
    echo "ok";

    $editsummaryDefs ['Users'] = 
    array (
      
    'USER_NAME' => 
      array (
        
    'width' => '5%',
        
    'label' => 'LBL_USER_NAME',
        
    'link' => true,
        
    'default' => true,
      ),
    ); 

    However, the editsummarydefs file is ignored. My template file is well displayed but no fields from the defs file are displayed.

    I have also added this file :
    custom/modules/Users/metadata/metafiles.php
    PHP Code:
     $metafiles['Users'] = array(
        
    'editsummarydefs'  =>     'custom/modules/Users/metadata/editsummarydefs.php',     
     ); 
    Actually, I would like to include the assigned_user field in my view, that's why I need to define the editsummarydefs.php.

    What do you think is missing ?
    Thank you very much for any help.
    I had same the issue, and following worked for me:

    Change
    $metadataFile = $this->getMetaDataFile();
    to
    $metadataFile='custom/modules/Users/metadata/editsummarydefs.php';
    in the following file:
    custom/modules/Users/views/view.editsummary.php

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. help me to view sugarcrm.log file..
    By navin007 in forum Developer Help
    Replies: 3
    Last Post: 2012-04-16, 02:35 PM
  2. Replies: 1
    Last Post: 2009-02-16, 11:08 PM
  3. Replies: 1
    Last Post: 2009-02-05, 01:31 PM
  4. Replies: 1
    Last Post: 2008-11-27, 01:17 PM
  5. how to view the log file of Sugar CRM?
    By navin007 in forum Help
    Replies: 2
    Last Post: 2008-07-30, 02: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
  •