Answers.Body: <p>Revisions and Drafts are first-class citizens of the Element world in Craft 3.2.</p>
  
  <p>So for your example:</p>
  
  <blockquote>
    <p>The plugin has it's own tables the track drafts by it's ID alone, so it's my primary means of looking up drafts.</p>
  </blockquote>
  
  <p>This is what you would do:</p>
  
  <pre><code>$draft = Entry::find()
      -&gt;draftId(123)
      -&gt;one();
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-26T18:04:17.210Z
Answers.LastActivityDate: 2019-07-26T18:04:17.210Z
Answers.UserDisplayName: Brad Bell
Body: <p>Client has a custom Craft plugin for managing their bespoke publication workflow on a large website. Content creators create new or updated content that is saved as drafts, then inspected and approved by editors before publication.</p>
  
  <p>This plugin makes heavy use of the <a href="https://docs.craftcms.com/api/v3/craft-services-entryrevisions.html" rel="nofollow noreferrer">EntryRevisions Service</a> Which has been deprecated in CraftCMS 3.2. For example, the plugin often fetches a draft instance by ID before performing other actions (publish/edit/delete), using information in the draft to create a notification email, or getting the contents of the draft for review. The plugin has it's own tables the track drafts by it's ID alone, so it's my primary means of looking up drafts.</p>
  
  <p>The API documentation says to use the <a href="https://docs.craftcms.com/api/v3/craft-elements-db-entryquery.html" rel="nofollow noreferrer">EntryQuery</a> API instead, but the docs don't mention how to get a draft or revision.</p>
  
  <p>Does anyone know how drafts are fetched and worked with going forward?</p>
  
Tags: <craft3>
Title: Replacement for deprecated EntryRevisions service
ThreadText: # Replacement for deprecated EntryRevisions service
  
  (Asked by: username_0 on 2019-07-26)
  
  Client has a custom Craft plugin for managing their bespoke publication workflow on a large website. Content creators create new or updated content that is saved as drafts, then inspected and approved by editors before publication.
  
  This plugin makes heavy use of the [EntryRevisions Service](https://docs.craftcms.com/api/v3/craft-services-entryrevisions.html) Which has been deprecated in CraftCMS 3.2. For example, the plugin often fetches a draft instance by ID before performing other actions (publish/edit/delete), using information in the draft to create a notification email, or getting the contents of the draft for review. The plugin has it's own tables the track drafts by it's ID alone, so it's my primary means of looking up drafts.
  
  The API documentation says to use the [EntryQuery](https://docs.craftcms.com/api/v3/craft-elements-db-entryquery.html) API instead, but the docs don't mention how to get a draft or revision.
  
  Does anyone know how drafts are fetched and worked with going forward?
  
  **Tags:** craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-26. Score: 1 | Accepted answer
  
  Revisions and Drafts are first-class citizens of the Element world in Craft 3.2.
  
  So for your example:
  
  > The plugin has it's own tables the track drafts by it's ID alone, so it's my primary means of looking up drafts.
  
  This is what you would do:
  
  ```
  $draft = Entry::find()
      ->draftId(123)
      ->one();
  
  ```
  
  
  ---
  
  