Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:modifications:popup_relations [2014/10/09 14:45]
swarnat [Create a Relation]
en:modifications:popup_relations [2014/11/03 10:52] (current)
swarnat [Create a Relation]
Line 5: Line 5:
 </​WRAP>​ </​WRAP>​
  
 +===== Explanation of modification =====
 +
 +This modification could help you, if you create a custom module and want to link this module with default modules.
 +
 +For example you create a new Module "​Buildings"​ which has a field "​Organization"​ to link a Organizations.
 +Now you had a related field in Contacts to choose a record within the new "​Buildings"​ module.
 +
 +In basic Vtiger you will see every available record in "​Buildings"​ if you click on the search button, regardless if you select a Organization in the Contact, which could limit the available records.
 +This modification will integrate this in a flexible way.
 +You could create a configuration in the database to only get Buildings from the Organization of the Contacts as selection. (See below)
 +But you are not limited to this records. If you use the search option in the popup you could nevertheless select every record.
 +===== Read first =====
 This modification was only tested in vtigerCRM 6.1. This modification was only tested in vtigerCRM 6.1.
  
Line 17: Line 29:
 CREATE TABLE IF NOT EXISTS `vtiger_popup_relation` ( CREATE TABLE IF NOT EXISTS `vtiger_popup_relation` (
 `id` int(11) NOT NULL, `id` int(11) NOT NULL,
-`src_module` varchar(30) NOT NULL, +  ​`src_module` varchar(30) NOT NULL, 
-`src_field` varchar(50) NOT NULL, +  `src_field` varchar(50) NOT NULL, 
-`module` varchar(30) NOT NULL, +  `module` varchar(30) NOT NULL, 
-`search_key` varchar(50) NOT NULL+  `search_key` varchar(50) NOT NULL, 
 +  `search_value` varchar(50) NOT NULL
 ) ENGINE=InnoDB ; ) ENGINE=InnoDB ;
  
Line 143: Line 156:
 | src_field | You get from the PopUP URL | | src_field | You get from the PopUP URL |
 | module | You get from the PopUP URL | | module | You get from the PopUP URL |
-| search_key | Which column ​in the related module should used to search | +| search_key | Which field in the related module should ​be used to search | 
-| search_value | Which columnvalue ​of the record you modify should be used |+| search_value | Which fieldvalue ​of the record you modify should be used |
 <WRAP center ​ tip 100%> <WRAP center ​ tip 100%>
 === Example === === Example ===