Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4844

Provide hook to filter the list of available contacts in a given Contact Reference custom field

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Currently any Contact Reference custom field will returns ALL contacts to the user. This simplifies implementation, but exposes ALL names from the db to the end user. For many use cases, there is a need to filter this listing - for example to expose only contacts in a specific Group. This hook allows folks to modify the query. It also sends in the custom field id, so the hook implementation can be custom field / context specific.

      Documentation and an example can be found here (until 3.0 doc is transitioned to stable):
      http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification

      and then here:
      http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification

        Attachments

          Activity

            People

            • Assignee:
              amit Amiteshwar Prasad
              Reporter:
              lobo Donald A. Lobo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: