Answers.Body: <p>You need to install civicrm using buildkit to ensure you have all the dependencies / tools / files.
  Then have a look here: <a href="https://docs.civicrm.org/dev/en/master/extensions/civix/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/master/extensions/civix/</a></p>
  
  <p>Examples of extensions that have done it (see ./bin/setup.sh for a scripted method of DAO creation): <a href="https://github.com/civicrm/org.civicrm.volunteer" rel="nofollow noreferrer">https://github.com/civicrm/org.civicrm.volunteer</a>
  And <a href="https://github.com/3sd/civicrm-sms-conversations/" rel="nofollow noreferrer">https://github.com/3sd/civicrm-sms-conversations/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-22T11:52:23.720Z
Answers.Text: Thank you. I have to try buildkit and then response you back.
Answers.UserDisplayName: Syed Aqeel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-22T09:27:34.457Z
Answers.LastActivityDate: 2017-06-22T09:27:34.457Z
Answers.UserDisplayName: Matthew Wire
Body: <p>As I am new to CiviCRM. I am trying to create a new entity for my extension to add some new data in <code>database schema</code>. The documentation I am following to create a new entity is: <a href="https://docs.civicrm.org/dev/en/master/extensions/civix/#generate-entity" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/master/extensions/civix/#generate-entity</a></p>
  
  <p><strong>What I have done using the documentation till Now:</strong></p>
  
  <ul>
  <li>I have created successfully new extension under the folder <code>&lt;drupalroot&gt;/sites/.../civicrm/ext/</code></li>
  <li>The extension is <code>enabled</code> from the <strong>CiviCRM » Administer » System Settings » Extensions</strong></li>
  <li>I have used <code>civix generate:entity MyEntity</code> to generate a new entity.</li>
  <li>The entity is generated under the <code>ext/myextension/</code>.</li>
  <li>This command has created seketal files successfully.</li>
  <li>I have edited the <code>xml</code> file to add fields for entity <em>(table)</em>.</li>
  <li>Now, <strong>1 - 3</strong> points are done.</li>
  </ul>
  
  <p>I have got stucked when following the point <strong>4 - end</strong>. The overflow and files and folder structure is defined in these point and how to generate or run the <code>DAO file</code> to run <code>sql</code> to create new table in <code>database schema</code> looks weird to me.  <strong>I am using</strong> <code>Drupal v7</code>, <code>Civicrm v4.7.2 for drupal 7.x</code> and <code>XAMPP</code> on <code>Windows OS</code> envirnoment. I don't now what I have to do after it to successfully create and use entity in my <code>CiviCRM</code> extension.</p>
  
  <p>Please help me to solve this problem. I am very thankful to you in advance.</p>
  
  <p>Best Regards.</p>
  
Tags: <drupal><extension><developer><civix>
Title: How to add a new entity in CiviCRM extension
ThreadText: # How to add a new entity in CiviCRM extension
  
  (Asked by: username_0 on 2017-06-22)
  
  As I am new to CiviCRM. I am trying to create a new entity for my extension to add some new data in `database schema`. The documentation I am following to create a new entity is: <https://docs.civicrm.org/dev/en/master/extensions/civix/#generate-entity>
  
  **What I have done using the documentation till Now:**
  
  * I have created successfully new extension under the folder `<drupalroot>/sites/.../civicrm/ext/`
  * The extension is `enabled` from the **CiviCRM » Administer » System Settings » Extensions**
  * I have used `civix generate:entity MyEntity` to generate a new entity.
  * The entity is generated under the `ext/myextension/`.
  * This command has created seketal files successfully.
  * I have edited the `xml` file to add fields for entity *(table)*.
  * Now, **1 - 3** points are done.
  
  I have got stucked when following the point **4 - end**. The overflow and files and folder structure is defined in these point and how to generate or run the `DAO file` to run `sql` to create new table in `database schema` looks weird to me. **I am using** `Drupal v7`, `Civicrm v4.7.2 for drupal 7.x` and `XAMPP` on `Windows OS` envirnoment. I don't now what I have to do after it to successfully create and use entity in my `CiviCRM` extension.
  
  Please help me to solve this problem. I am very thankful to you in advance.
  
  Best Regards.
  
  **Tags:** drupal, extension, developer, civix
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-22. Score: 1
  
  You need to install civicrm using buildkit to ensure you have all the dependencies / tools / files.
  Then have a look here: <https://docs.civicrm.org/dev/en/master/extensions/civix/>
  
  Examples of extensions that have done it (see ./bin/setup.sh for a scripted method of DAO creation): <https://github.com/civicrm/org.civicrm.volunteer>
  And <https://github.com/3sd/civicrm-sms-conversations/>
  
  > **Comments:**
  > **username_0**: Thank you. I have to try buildkit and then response you back.  
  
  ---
  
  