Answers.Body: <p>This was fixed using the following code, as you can see. <code>submission.entry</code> needed <code>.value</code> attached to it.</p>
  
  <pre><code>{% set entrynumber = submission.entry.value %}
  {% set proposalEntry = craft.entries().id(entrynumber).one() %}
  {{ entrynumber }}
  {{ proposalEntry.id }}
  {{ proposalEntry.proposalAddress }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-22T23:44:29.767Z
Answers.LastActivityDate: 2019-04-22T23:44:29.767Z
Answers.UserDisplayName: JMKelley
Answers.Body: <p>I'm guessing that 'submission.entry' is not really the same as entry id. If you are using the connections method with Freeform then the data is stored as json against the form id. I think we need more info about how this bit works: "the ID of a specific entry that the Email is associated to"</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-22T14:46:00.333Z
Answers.Text: The following queries work perfectly. It is the correct ID for the entry, even `entrynumber` displays correctly. I think the problem is that `entrynumber` isn't getting loaded into the craft entries id field.
Answers.UserDisplayName: JMKelley
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-22T16:05:49.297Z
Answers.Text: What happens when you manually put '441' into {% set proposalEntry = craft.entries.id(441).first() %}
Answers.UserDisplayName: joomkit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-22T13:14:40.453Z
Answers.LastActivityDate: 2019-04-22T13:14:40.453Z
Answers.UserDisplayName: joomkit
Body: <p>I have a Freeform Email Notification getting sent out where I'm trying to fetch the ID of a specific entry that the Email is associated to. The emails are working, yet the entry that it's returning is completely wrong - yet the ID is right. I don't have a clue what's going on!</p>
  
  <pre><code>{% set entrynumber = submission.entry %}
  {% set proposalEntry = craft.entries.id(entrynumber).first() %}
  {{ entrynumber }}
  {{ proposalEntry.id }}
  {{ proposalEntry.title }}
  {{ proposalEntry.author }}
  {{ proposalEntry.proposalCampaign }}
  </code></pre>
  
  <p>The above produces the following:</p>
  
  <ul>
  <li>441  </li>
  <li>471  </li>
  <li>Domino's Pizza New Yorker range  </li>
  <li>admin</li>
  </ul>
  
  <p>As you can see, it's the wrong entry that it's calling? It looks like it's just using the latest entry?</p>
  
Tags: <templating>
Title: Get Entry by Specific ID
ThreadText: # Get Entry by Specific ID
  
  (Asked by: username_0 on 2019-04-22)
  
  I have a Freeform Email Notification getting sent out where I'm trying to fetch the ID of a specific entry that the Email is associated to. The emails are working, yet the entry that it's returning is completely wrong - yet the ID is right. I don't have a clue what's going on!
  
  ```
  {% set entrynumber = submission.entry %}
  {% set proposalEntry = craft.entries.id(entrynumber).first() %}
  {{ entrynumber }}
  {{ proposalEntry.id }}
  {{ proposalEntry.title }}
  {{ proposalEntry.author }}
  {{ proposalEntry.proposalCampaign }}
  
  ```
  
  The above produces the following:
  
  * 441
  * 471
  * Domino's Pizza New Yorker range
  * admin
  
  As you can see, it's the wrong entry that it's calling? It looks like it's just using the latest entry?
  
  **Tags:** templating
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-04-22. Score: 1 | Accepted answer
  
  This was fixed using the following code, as you can see. `submission.entry` needed `.value` attached to it.
  
  ```
  {% set entrynumber = submission.entry.value %}
  {% set proposalEntry = craft.entries().id(entrynumber).one() %}
  {{ entrynumber }}
  {{ proposalEntry.id }}
  {{ proposalEntry.proposalAddress }}
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2019-04-22. Score: 1
  
  I'm guessing that 'submission.entry' is not really the same as entry id. If you are using the connections method with Freeform then the data is stored as json against the form id. I think we need more info about how this bit works: "the ID of a specific entry that the Email is associated to"
  
  > **Comments:**
  > **username_0**: The following queries work perfectly. It is the correct ID for the entry, even `entrynumber` displays correctly. I think the problem is that `entrynumber` isn't getting loaded into the craft entries id field.  
  > **username_1**: What happens when you manually put '441' into {% set proposalEntry = craft.entries.id(441).first() %}  
  
  ---
  
  