Results 1 to 2 of 2

Thread: Duplicate EditRoleButton functionality with another table

  1. #1
    Ramblin is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    98

    Default Duplicate EditRoleButton functionality with another table

    Does anyone know how to adapt the EditRoleButton functionality in the ForContacts subpanel shown in the Opportunities module to work with another module pair combnination?

    I have everything else working in my new module pair and the relationship between them
    New fields added to the relationship table
    New Vardefs defined
    New Language files defined
    New Subpanels defined and properly displaying the values and labels for the custom fields
    Manifest file and Publish configuration worked out to share (once I get it working)

    BUT

    I cannot figure out how to enter/change the data in the custom fields other than via direct edits to the MySQL database. I cannot figure out what to do get the EditRoleButton functionality to work for my new relationship like it does for the Opportunities_Contacts relationship contact_role field.

    Help?

    Here is what I have done:

    I have created an Events module (for training events) that has a many<->many relationship with attendees (Contacts).

    I added, to the Events_Contacts relationship table, two custom fields: Status (NoShow, NonGraduate, Graduate) and #Hours (to track Continuing Education Credit hours per attendee). These fields need to be in the relationship table because they are unique for each Attendee/Event combination, so they can neither be stored in Contacts nor Events.

    I have the Status and # Hours fields properly displaying in each subpanel: the Events subpanel that was added to the Contacts Detail view and the Contacts subpanel that was added to the Events Detail view.

    When I click the Edit button in the Contacts Edit button it takes me to the full Event Edit view which is what I want. (I started with the default subpanel and edited to display the custom fields)

    I have copied the ForOpportunities subpanel from the Contacts module as my starting point, for the other subpanel, (and edited to display the custom fields) to so when I click the Edit button I wanted it to allow me to add/change the Status and #Hours data. It currently just goes back to editing the Opportunities_Contacts fields - no surprise, since i have not been able to figure out waht to do to customize it.

    Does anyone have a step-by-step explanation for how to adapt the EditRoleButton functionality to let me add/change the data in my new fields?

    I I can get this working, I will publish a (very) detailed document showing the whole process; I have seen a lot of discussion board discussion, but no resolution to the whole solution (yet).

    I am on Sugar 6.2 on a LAMP stack if it matters.

  2. #2
    Ramblin is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    98

    Default Re: Duplicate EditRoleButton functionality with another table

    Problem solved

    I have the relationship fields properly displaying in the subpanel and the EditRoleButton properly entering/editing the additional custom fields (I have two) in the relationship table.

    For a full posting, see
    http://www.sugarcrm.com/forums/showthread.php?t=69667

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: 2011-07-29, 09:12 PM
  2. Duplicate problem in team_membships table
    By ramji123 in forum Developer Help
    Replies: 0
    Last Post: 2010-08-02, 02:47 PM
  3. Duplicate records in table
    By Glitch in forum Developer Help
    Replies: 4
    Last Post: 2009-07-21, 05:53 PM
  4. Duplicate the 'Member of' functionality
    By REByers in forum Help
    Replies: 1
    Last Post: 2009-06-17, 12:01 PM
  5. Duplicate lead > contact functionality
    By dante2010 in forum Help
    Replies: 4
    Last Post: 2009-03-10, 11:11 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
  •