<p>You should be able to check for this like so:</p>

<pre><code>if($params['isNewEntry'])
{
 // The entry is new
{
else
{
 // The entry is being updated
{
</code></pre>

<p>See here in the docs: <a href="http://buildwithcraft.com/docs/plugins/events-reference#entries-onBeforeSaveEntry" rel="nofollow">http://buildwithcraft.com/docs/plugins/events-reference#entries-onBeforeSaveEntry</a></p>

CC BY-SA 3.0
2015-08-26T11:36:38.713Z
Cheers @AlecRitson perfect
Lettie
CC BY-SA 3.0
2015-08-26T10:44:45.710Z
2015-08-26T11:41:39.877Z
2015-08-26T11:41:39.877Z
Alec Ritson
<p>I have a plugin using the onBeforeSaveEntry event. Is there a simple way to check if the entry being saved is a brand new entry i.e. Add New Entry or if it currently exists and is just being updated?</p>

<entries><plugins><entry>
Check saved entry is a brand new entry
# Check saved entry is a brand new entry

(Asked by: username_0 on 2015-08-26)

I have a plugin using the onBeforeSaveEntry event. Is there a simple way to check if the entry being saved is a brand new entry i.e. Add New Entry or if it currently exists and is just being updated?

**Tags:** entries, plugins, entry


---

## 1 answers

### Answer by username_1 on 2015-08-26. Score: 4 | Accepted answer

You should be able to check for this like so:
if($params['isNewEntry'])
{
 // The entry is new
{
else
{
 // The entry is being updated
{

See here in the docs: http://buildwithcraft.com/docs/plugins/events-reference#entries-onBeforeSaveEntry

> **Comments:**
> **username_0**: Cheers @AlecRitson perfect  

---

