In SugarCRM 7.5 Professional, how can you add custom relationship field? -
in sugarcrm 7.5 when open contacts , view record in opportunities subpanel can link opportunity record , set contact_role
(opportunity role) custom relationship field existing in opportunities_contacts
in database.
now need same functionality working 2 custom modules many-to-many relationship between them , access_rights
custom relationship field.
two custom modules created using module builder , deployed: c_accounts, c_users.
the many-to-many relationship between c_accounts , c_users created in studio.
in
custom/metadata/c_accounts_c_usersmetadata
added
5 => array ( 'name' => 'access_rights', 'type' => 'varchar', 'len' => 36, ),
and quick repair & rebuild. accepted sql query , access_rights field added relationship table in database.
- next, added both custom modules
custom/extension/modules/{module}/ext/vardefs/account_user_access_rights.php
and able see field in studio subpanels , add column subpanels view.
now, problem columns shown in subpanels both custom modules there no data shown database. how data link table subpanels?
after above accomplished. next thing able edit/save field in subpanels.
the tools (such module builder) not support out of box. example, contact role field mention implemented part of contactopportunityrelationship bean within contacts module.
if @ how opportunity role defined in contacts metadata, you'll see need make sure add right "rname_link" field definition. make sure sugarquery (which used populate subpanels in 7.5) adds right join populate subpanel.
Comments
Post a Comment