douguluan5102 2014-11-24 11:40
浏览 29
已采纳

Sugarcrm:如何根据联系人关系字段中的类型过滤帐户?

I have a field account_type in accounts where it has values Resseller, Partner etc. Accounts has 1:N relationship with contacts. I created a custom field in Contacts of account_type_c where it has same values as of accounts modules.

So, when creating a contact if user select Resseller, in the related field for Accounts it should show only accounts of type Resseller. Currently, we have to go to account and create filter here for accounts and than it show accordingly. But I want it to automatically show users the related accounts as per the type selected in the contact.

I am using SugarPro 7.2.x.

Any help is really appreciated.

  • 写回答

1条回答 默认 最新

  • douang2297 2015-07-13 09:19
    关注

    I edited the custom record view of accounts i.e. record.php and in the reseller field added following to array:

    filter_populate' => 
                    array (
                      'account_type_c' => 'Resellers',
                    ),
    

    Also, use this link for further reading.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?