Answers.Body: <p>If you are using CiviCRM within Drupal, you can create Drupal Custom Content Types for magazine, advert, etc. Your custom content type definition can include fields of data type "CiviCRM Contact" which can be required, optional, multi-valued, etc.   </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-28T16:05:41.020Z
Answers.LastActivityDate: 2015-07-28T16:05:41.020Z
Answers.UserDisplayName: Sarah Poger Gladstone
Answers.Body: <p>This is possible in CiviCRM, but the documentation for doing so has been scattered and incomplete.  It's now gathered here in one place: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addanewentity" rel="nofollow">https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addanewentity</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-23T21:45:56.213Z
Answers.LastActivityDate: 2016-04-23T21:45:56.213Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm fairly new to working with Drupal and CiviCRM so I apologize on my lack of knowledge. I was looking into customizing CiviCRM and stripping out a lot of stuff I don't need. Stripping out and hiding things seems fairly easy according to the documentation, but how would I go about creating totally new entities that I can add my own custom fields to? There doesn't seem to be any discussion or examples on this? I'm used to working with Microsoft CRM in the past where you can create your own entities and custom fields and then relate these new entities back to existing ones. I've looked into creating a custom extension via the documentation but this doesn't seem to cover creating a totally new separate entity. Am I missing anything? </p>
  
  <p>*Edit, see this example of Microsoft CRM where you can easily create custom entities to fit your needs. This is the type of functionality I'm looking for. <a href="https://www.youtube.com/watch?v=YrwBpRVeMwo" rel="nofollow">https://www.youtube.com/watch?v=YrwBpRVeMwo</a>. Obviously CiviCRM isn't Microsoft, but I feel that having the ability to create custom entities is highly important to tailoring a fitting solution. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-27T20:00:09.657Z
Comments.Text: welcome - can you please flesh out the requirement, ie what would be different once you have a new custom entity. Also what are the use cases where you need stuff stripped out.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-27T20:25:03.027Z
Comments.Text: Lets say I want to keep and customize (remove certain fields) from the Contacts entity. I would not be using most of the other components either. For custom entities, I would like to create one for Magazines, and one for Advertisements. This would not be used in a typical CRM fashion but more so a custom XRM way for custom data/relationship needs.
Comments.UserDisplayName: tderosier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-27T23:52:17.833Z
Comments.Text: @tderosier can you please edit your question to incorporate your comment and fully describe your requirement.
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-28T03:52:54.817Z
Comments.Text: if you can flesh out what a 'magazine' means, or an 'advert' then we might be able to advise. eg Does Company X 'publish' a magazine (Y). Does Company Z 'purchase' an advert in Magazine Y?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-28T15:08:01.603Z
Comments.Text: @Coleman, please see my newly added edit for more details.
Comments.UserDisplayName: tderosier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-28T15:19:49.057Z
Comments.Text: @petednz, Essentially yes. Basically an entity for Magazines would just hold specific information about the magazine such as title, issue number, date, description, etc. Then the advertisements entity would have a lookup field to select the magazine issue and lookup field for company (contacts entity) as well as hold additional fields for advertisement details. 
  
  Now I'm not sure if CiviCRM is a fitting solution for this as I'm new to it. I noticed that Drupal allows you to create custom content types and fields which may be what I'm looking for instead.
Comments.UserDisplayName: tderosier
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-28T20:42:05.017Z
Comments.Text: From years of engaging with the forum, i would say the more you can say what your scenario is the more people can help flesh out ideas on how to do it in civi. For example, Magazines could be an Organisation Contact SubType - that has a Relationship to the Company that owns it. And an Advertising booking (if that is what you need) might be a custom Activity that relates to the specific Magazine, or it might be a Contribution (if it involves a purchase). Is that more of the type of answer you need? If so I can convert this to one.
Comments.UserDisplayName: petednz - fuzion
Tags: <extension>
Title: How do I create a custom entity (component)?
ThreadText: # How do I create a custom entity (component)?
  
  (Asked by: username_0 on 2015-07-27)
  
  I'm fairly new to working with Drupal and CiviCRM so I apologize on my lack of knowledge. I was looking into customizing CiviCRM and stripping out a lot of stuff I don't need. Stripping out and hiding things seems fairly easy according to the documentation, but how would I go about creating totally new entities that I can add my own custom fields to? There doesn't seem to be any discussion or examples on this? I'm used to working with Microsoft CRM in the past where you can create your own entities and custom fields and then relate these new entities back to existing ones. I've looked into creating a custom extension via the documentation but this doesn't seem to cover creating a totally new separate entity. Am I missing anything?
  
  \*Edit, see this example of Microsoft CRM where you can easily create custom entities to fit your needs. This is the type of functionality I'm looking for. <https://www.youtube.com/watch?v=YrwBpRVeMwo>. Obviously CiviCRM isn't Microsoft, but I feel that having the ability to create custom entities is highly important to tailoring a fitting solution.
  
  **Tags:** extension
  
  > **Comments:**
  > **username_1**: welcome - can you please flesh out the requirement, ie what would be different once you have a new custom entity. Also what are the use cases where you need stuff stripped out.  
  > **username_0**: Lets say I want to keep and customize (remove certain fields) from the Contacts entity. I would not be using most of the other components either. For custom entities, I would like to create one for Magazines, and one for Advertisements. This would not be used in a typical CRM fashion but more so a custom XRM way for custom data/relationship needs.  
  > **username_2**: @username_0 can you please edit your question to incorporate your comment and fully describe your requirement.  
  > **username_1**: if you can flesh out what a 'magazine' means, or an 'advert' then we might be able to advise. eg Does Company X 'publish' a magazine (Y). Does Company Z 'purchase' an advert in Magazine Y?  
  > **username_0**: @username_2, please see my newly added edit for more details.  
  > **username_0**: @username_1, Essentially yes. Basically an entity for Magazines would just hold specific information about the magazine such as title, issue number, date, description, etc. Then the advertisements entity would have a lookup field to select the magazine issue and lookup field for company (contacts entity) as well as hold additional fields for advertisement details.   Now I'm not sure if CiviCRM is a fitting solution for this as I'm new to it. I noticed that Drupal allows you to create custom content types and fields which may be what I'm looking for instead.  
  > **username_1**: From years of engaging with the forum, i would say the more you can say what your scenario is the more people can help flesh out ideas on how to do it in civi. For example, Magazines could be an Organisation Contact SubType - that has a Relationship to the Company that owns it. And an Advertising booking (if that is what you need) might be a custom Activity that relates to the specific Magazine, or it might be a Contribution (if it involves a purchase). Is that more of the type of answer you need? If so I can convert this to one.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2015-07-28. Score: 1
  
  If you are using CiviCRM within Drupal, you can create Drupal Custom Content Types for magazine, advert, etc. Your custom content type definition can include fields of data type "CiviCRM Contact" which can be required, optional, multi-valued, etc.
  
  
  ---
  
  ### Answer by username_4 on 2016-04-23. Score: 1
  
  This is possible in CiviCRM, but the documentation for doing so has been scattered and incomplete. It's now gathered here in one place: <https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addanewentity>
  
  
  ---
  
  