Results 1 to 4 of 4

Thread: Add Id to account title

  1. #1
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Add Id to account title

    Hi all

    I would like to know if it is possible to add a field vaule to the title in the Account Edit or Account Detail View.

    I mean for example, when you select a record in the Account List View, and then you go to the Account Detail View, you can see that the title is "Account:"+ account_name (see picture attached).

    What I would like to get is adding the value of a field called "Account_VAT" to the title so it is easier to identify the record; something like

    Account:+account_name+-+account_vat

    Is this possible to get?

    Thanks a lot
    Attached Images Attached Images  

  2. #2
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: Add Id to account title

    Yes, this is possible, at least for detail view. You'll need to copy your detailviewdefs.php from modules/accounts/metadata to custom/modules/accounts/metadata (if it is not already in that folder). Once you do that, find the field that looks like:
    PHP Code:
    array (
                
    'name' => 'name',
                
    'comment' => 'Name of the Company',
                
    'label' => 'LBL_NAME',
              ), 
    and add the line
    PHP Code:
    'customCode' => '{$fields.name.value}  {$fields.yourVariable.value} '
    where yourVariable is the name of your variable (note that if this is a custom variable you may have to append an '_c' at the end of the variable name). If it doesn't update automatically (the metadata is usually cached), turn developer mode on (admin->system settings), and then once you get what you need, turn it back off as it takes up more processing.

    I don't know if this is possible in edit view without a lot of work as its somewhat nonstandard (in any html form, not just sugar) to have one input field for two different variables.
    Robert Beckman
    Software Engineer
    Mirth Corporation

  3. #3
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Re: Add Id to account title

    Hi Robert

    Will give it a try, and also will keep searching to see if this is possible in the EditView as it is where really I need it.

    Thanks a lot for the help!!

  4. #4
    AlexAv's Avatar
    AlexAv is offline Sugar Community Member
    Join Date
    Oct 2009
    Location
    Ukraine
    Posts
    922

    Default Re: Add Id to account title

    Also you can do the same.

    PHP Code:

    'customCode' => '{$fields.yourVariable.value} <input type="text" name='"name" value="{$fields.name.value}">, 
    Last edited by AlexAv; 2010-10-19 at 10:01 AM.
    Letrium ltd. - Only high quality service
    http://letrium.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Page Title
    By Carlos Assis in forum General Discussion
    Replies: 2
    Last Post: 2010-06-15, 04:48 PM
  2. change title from localhost to some other title
    By sidh211 in forum Developer Help
    Replies: 3
    Last Post: 2009-09-16, 04:02 PM
  3. HELP title bar
    By kinhami in forum Help
    Replies: 1
    Last Post: 2008-06-27, 12:57 PM
  4. Descriptive Title Tag
    By tvancura in forum Feature Requests
    Replies: 0
    Last Post: 2004-10-19, 08:01 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
  •