Answers.Body: <p>When creating a custom fieldset, you need to ascribe to &quot;ANY&quot; when your contact type has sub-types. Instead, if ascribed to a particular sub-type (Organization - enterprise, for example), the custom field doesn't show up in dedupe rules :-(</p>
  <p>So I found my solution but I would like to have the ability to use custom fields related to a sub-type and not all of them.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-11T16:32:34.370Z
Answers.LastActivityDate: 2020-08-11T16:32:34.370Z
Answers.UserDisplayName: Guillaume Sorel
Body: <p>My organization contacts can sometimes share the same email address but I have one custom field that is unique to each organization (registration number) and I want to add this custom field to enhance the unsupervised rule.
  The thing is that I don't see this option. I can use any standard field (city, zip code...) but none of my custom fields appear.</p>
  <p>Is this possible and how? Do I need and extension to do so or to set a parameter somewhere?</p>
  <p>EDIT 1 : I use CiviCRM 5.25 on Drupal 7.72</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-11T15:22:13.373Z
Comments.Text: I just checked on 5.24 on Drupal and could add a custom field to a rule for organisations and save it without problems. Maybe worth adding version and CMS to your post as that may help find an answer
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-11T15:46:24.433Z
Comments.Text: thanks Rebecca for the reminder! Did you use an existing rule or did you create a new one on purpose?
Comments.UserDisplayName: Guillaume Sorel
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-11T15:50:55.260Z
Comments.Text: I amended (and renamed) the standard unsupervised one for organisations. Maybe worth checking on demo too?
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-11T15:58:44.617Z
Comments.Text: I tried this way but still can't find the custom fields. Maybe it comes from the fact that it is a sub-type of Organization. I will also test on the demo.
Comments.UserDisplayName: Guillaume Sorel
Tags: <duplicate-contacts>
Title: Dedupe based on custom fields?
ThreadText: # Dedupe based on custom fields?
  
  (Asked by: username_0 on 2020-08-11)
  
  My organization contacts can sometimes share the same email address but I have one custom field that is unique to each organization (registration number) and I want to add this custom field to enhance the unsupervised rule.
  The thing is that I don't see this option. I can use any standard field (city, zip code...) but none of my custom fields appear.
  
  Is this possible and how? Do I need and extension to do so or to set a parameter somewhere?
  
  EDIT 1 : I use CiviCRM 5.25 on Drupal 7.72
  
  **Tags:** duplicate-contacts
  
  > **Comments:**
  > **username_1**: I just checked on 5.24 on Drupal and could add a custom field to a rule for organisations and save it without problems. Maybe worth adding version and CMS to your post as that may help find an answer  
  > **username_0**: thanks Rebecca for the reminder! Did you use an existing rule or did you create a new one on purpose?  
  > **username_1**: I amended (and renamed) the standard unsupervised one for organisations. Maybe worth checking on demo too?  
  > **username_0**: I tried this way but still can't find the custom fields. Maybe it comes from the fact that it is a sub-type of Organization. I will also test on the demo.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-08-11. Score: 2 | Accepted answer
  
  When creating a custom fieldset, you need to ascribe to "ANY" when your contact type has sub-types. Instead, if ascribed to a particular sub-type (Organization - enterprise, for example), the custom field doesn't show up in dedupe rules :-(
  
  So I found my solution but I would like to have the ability to use custom fields related to a sub-type and not all of them.
  
  
  ---
  
  