Answers.Body: <p>Not that I am aware of Aidan, but sounds like something that could be very useful!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-12T07:56:46.820Z
Answers.LastActivityDate: 2020-03-12T07:56:46.820Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p>You might be interested in this:</p>
  <p><a href="https://github.com/twomice/com.joineryhq.hideactivitytypes" rel="nofollow noreferrer">CiviCRM: Hide Activity Types (com.joinery.hideactivitytypes)</a></p>
  <blockquote>
  <p>Hide activity types in one or more ways:</p>
  <ul>
  <li>Remove the activity type from the &quot;Actions&quot; list on the Activity Summary.</li>
  <li>On a per-contact-type basis: activity type will be removed from the &quot;New Activity&quot; list under a contact's Activities tab, based on the contact's Type or Sub-Type.</li>
  </ul>
  </blockquote>
  <p><a href="https://i.sstatic.net/3V4e4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3V4e4.png" alt="enter image description here" /></a></p>
  <p>Note, however, it only does what's stated above. It won't prevent creating activities in some other way, e.g., via api, or the New Activiy form. (But if  features for more aggressive limitation are desired, I think it would be a good fit to add them.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-12T16:14:49.743Z
Answers.LastActivityDate: 2020-03-12T16:14:49.743Z
Answers.LastEditDate: 2020-06-17T09:00:50.810Z
Answers.UserDisplayName: TwoMice
Body: <p>We have a custom activity type that should only be added to contacts of a specific contact subtype (ie activity targets must be of given contact subtype)</p>
  
  <p>Is there an extension to enforce this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-11T12:56:53.307Z
Comments.Text: +1, and also that the types of activity may be limited depending on the user role/permission, for example volunteers can't create/edit/view activities of type "Volunteer interview"
Comments.UserDisplayName: Francesc Bassas i Bullich
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-11T13:40:55.160Z
Comments.Text: For role/permission there is https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl. Not sure if there's something for the original question.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-12T16:03:12.830Z
Comments.Text: We have something in beta now which does this, though it doesn't enforce heavily on the form validation side -- just makes the activities unavailable for New Activity creation under the contact's Activities tab. I'll get you a link momentarily.
Comments.UserDisplayName: TwoMice
Tags: <extension><activity>
Title: Is there an extension to limit activity types to contact types?
ThreadText: # Is there an extension to limit activity types to contact types?
  
  (Asked by: username_0 on 2020-03-11)
  
  We have a custom activity type that should only be added to contacts of a specific contact subtype (ie activity targets must be of given contact subtype)
  
  Is there an extension to enforce this?
  
  **Tags:** extension, activity
  
  > **Comments:**
  > **username_1**: +1, and also that the types of activity may be limited depending on the user role/permission, for example volunteers can't create/edit/view activities of type "Volunteer interview"  
  > **username_2**: For role/permission there is https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl. Not sure if there's something for the original question.  
  > **username_3**: We have something in beta now which does this, though it doesn't enforce heavily on the form validation side -- just makes the activities unavailable for New Activity creation under the contact's Activities tab. I'll get you a link momentarily.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2020-03-12. Score: 3 | Accepted answer
  
  You might be interested in this:
  
  [CiviCRM: Hide Activity Types (com.joinery.hideactivitytypes)](https://github.com/twomice/com.joineryhq.hideactivitytypes)
  
  > Hide activity types in one or more ways:
  >
  > * Remove the activity type from the "Actions" list on the Activity Summary.
  > * On a per-contact-type basis: activity type will be removed from the "New Activity" list under a contact's Activities tab, based on the contact's Type or Sub-Type.
  
  [![enter image description here](https://i.sstatic.net/3V4e4.png)](https://i.sstatic.net/3V4e4.png)
  
  Note, however, it only does what's stated above. It won't prevent creating activities in some other way, e.g., via api, or the New Activiy form. (But if features for more aggressive limitation are desired, I think it would be a good fit to add them.)
  
  
  ---
  
  ### Answer by username_4 on 2020-03-12. Score: 0
  
  Not that I am aware of username_0, but sounds like something that could be very useful!
  
  
  ---
  
  