Results 1 to 9 of 9

Thread: Adding custom fields to History Subpanel

  1. #1
    cmcassity10's Avatar
    cmcassity10 is offline Sugar Community Member
    Join Date
    Dec 2009
    Location
    St. Louis, MO
    Posts
    56

    Default Adding custom fields to History Subpanel

    I have created a custom field across all of entities that the history subpanel grabs from. The header does show up on the subpanel but it does not show any data. The data is being saved to the database.

    I am also getting an error when trying to sort by the date field i have created in which it says that the field (completed_date_c) does not exist.

    Am i missing something? How does it know to query the modules_cstm table and not the main modules table when searching for these custom fields that are added?

  2. #2
    cmcassity10's Avatar
    cmcassity10 is offline Sugar Community Member
    Join Date
    Dec 2009
    Location
    St. Louis, MO
    Posts
    56

    Default Re: Adding custom fields to History Subpanel

    After some research, it seems it may be an issue with the varsdef.php file not having my field i've created in it. If this is the case, could someone expand on this solution? I haven't been able to find any good answers for this particular problem.

  3. #3
    cmcassity10's Avatar
    cmcassity10 is offline Sugar Community Member
    Join Date
    Dec 2009
    Location
    St. Louis, MO
    Posts
    56

    Default Re: Adding custom fields to History Subpanel

    bump for any helpful answer

  4. #4
    cmcassity10's Avatar
    cmcassity10 is offline Sugar Community Member
    Join Date
    Dec 2009
    Location
    St. Louis, MO
    Posts
    56

    Default Re: Adding custom fields to History Subpanel

    bump again, doesn't seem likely though from what i've read from other threads.

  5. #5
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: Adding custom fields to History Subpanel

    Hi cmcassity10,

    The history subpanel is tricky. You have to have the same number of fields in all the modules that are included in history (Calls, Emails, Meetings, Tasks, Notes).

    I just got changes working to show a meaningful date in place of date_modified.

    The threads I found most useful were:

    http://www.sugarcrm.com/forums/showt...subpanels+date

    and

    http://www.sugarcrm.com/forums/showt...ighlight=alias

    Note in the second post the use of the alias and the sort_by lines in every field definition in his ForOppsHistory subpanel. A similar set of definitions may solve your sorting problem.

    I also recall another post about problems using a custom field. If you add your date field by creating the definition in custom/Extension/Modules/<Your Module>/Ext/Vardefs it will go in the main table rather than the _cstm table. I did this successfully in the Notes module to display a custom date field in the date_modified column.

    Phil

  6. #6
    cmcassity10's Avatar
    cmcassity10 is offline Sugar Community Member
    Join Date
    Dec 2009
    Location
    St. Louis, MO
    Posts
    56

    Default Re: Adding custom fields to History Subpanel

    Phil,
    Thanks for the reply. From all of the tutorials and forum threads i found, none seemed very useful.

    To get passed this issue, i just went ahead and declared my new values in each of the ForHistory files and the vardefs of each module (calls, emails, meetings, etc) and had the custom fields applied directly to the main tables database (not the <module>_cstm ones). I'm not concerned about upgrade safety since this is for development purposes.

  7. #7
    hadoob024's Avatar
    hadoob024 is offline Sugar Community Member
    Join Date
    Mar 2010
    Posts
    137

    Default Re: Adding custom fields to History Subpanel

    Quote Originally Posted by cmcassity10 View Post
    I have created a custom field across all of entities that the history subpanel grabs from. The header does show up on the subpanel but it does not show any data. The data is being saved to the database.
    Hey, just wondering how you even got the header to show up. I'm trying to do what you're doing, but I can't even get as far as getting the header to show up. Here's what I've done so far:

    http://www.sugarcrm.com/forums/showt...t=38817&page=2
    -hadoob024-


    Windows 7 SP1
    PHP 5.2.17
    SQL Server 2008 R2
    IIS 7.5
    Sugar Professional Version 5.5.1

  8. #8
    datasponge is offline Sugar Community Member
    Join Date
    Mar 2008
    Location
    San Jose, CA, USA
    Posts
    553

    Default Re: Adding custom fields to History Subpanel

    As I recall, the header labels are defined in the Meetings language file. You can change this, but it's simplest to just add your new column name to Meetings and it should show up.

    See my links posted earlier as they resolve all these issues.

    Phil

  9. #9
    hadoob024's Avatar
    hadoob024 is offline Sugar Community Member
    Join Date
    Mar 2010
    Posts
    137

    Default Re: Adding custom fields to History Subpanel

    Got it. Thanks. Yeah, I think the problem was that I didn't update the files for all the other sections, i.e., Calls, Meetings, Tasks, etc. That looks like it will resolve my issue. Thanks!
    -hadoob024-


    Windows 7 SP1
    PHP 5.2.17
    SQL Server 2008 R2
    IIS 7.5
    Sugar Professional Version 5.5.1

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Add custom objects to history subpanel
    By geziefer in forum Developer Help
    Replies: 0
    Last Post: 2009-09-15, 01:43 PM
  2. History subpanel for custom module
    By rexavh in forum Developer Help
    Replies: 0
    Last Post: 2009-03-24, 12:02 PM
  3. Adding Calls/History to Custom Module
    By dblake in forum Developer Help
    Replies: 1
    Last Post: 2008-02-25, 03:11 PM
  4. Replies: 1
    Last Post: 2008-02-24, 03:31 PM
  5. Adding Data Entry Method when adding custom fields
    By pablo1999 in forum General Discussion
    Replies: 0
    Last Post: 2008-02-07, 05:09 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
  •