2017-07-24 88 views
2

我正在Sugarcrm 7.8中工作我試圖在聯繫人和我的自定義模塊示例myorder之間創建關係,但是當我選擇我的custome時它未顯示在類型字段中「相關模塊」中的模塊。一對多關係類型未在Studio中顯示 - SugarCRM

enter image description here

我想不出能找到這也解釋了這種情況的任何文檔。如果我沒有展示,我可以通過工作室做出一對一的關係。我真的不喜歡通過代碼創建它,因爲它會在我們嘗試檢索報告時破壞操作。如果我通過工作室工作的罰款。

任何我試圖創建follwing文件,看看它是否顯示任何關係。

的src /自定義/擴展/應用/分機/ TableDictionary/contacts_myorder_1.php 的src /自定義/元/ contacts_myorder_1MetaData.php

但它創建通過代碼的新關係。

有沒有人能夠實現類似的東西?

社區問:https://community.sugarcrm.com/message/94195-one-to-many-relationship-type-is-not-showing-in-studio

+0

根據我的經驗,其中一些只是莫名其妙地侷限於Studio內的One to One。 – Reisclef

+1

謝謝你也分享社區鏈接和答案:) – Jay

回答

1

一些深入的研究後發現,在我的自定義模塊,我應該解釋了模塊之間的關係。

創建下面的文件後。我可以看到關係。

的src /模塊/ mycustomodule /客戶端/鹼/佈局/子面板/ subpanels.php SRC /模塊/ mycustomodule/vardefs.php

內容:subpanels.php

array (
      'layout' => 'subpanel', 
      'label' => 'LBL_MYCUSTOMMODULE_SUBPANEL_CONTACTS', 
      'context' => array (
       'link' => 'mycustommodule_contacts', 
      ), 
     ), 

內容:vardefs.php

'mycustommodule_contacts' => array(
      'name'   => 'mycustommodule_contacts', 
      'type'   => 'link', 
      'relationship' => 'contacts_mycustommodule', 
      'module'  => 'Contacts', 
      'bean_name' => 'Contact', 
      'source'  => 'non-db', 
      'vname'  => 'LBL_MYCUSTOMMODULE_CONTACTS_LINK', 
     ), 

修復&重建。它按預期工作。希望它可以幫助別人。