# Cancel new records doesn't work

**URL:** https://forum.servoy.com/t/cancel-new-records-doesnt-work/15793
**Category:** Classic Servoy
**Created:** [April 10, 2012, 5:54pm UTC](https://forum.servoy.com/t/cancel-new-records-doesnt-work/15793 "2012-04-10T17:54:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DannyC](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@DannyC](https://forum.servoy.com/u/DannyC)
#### Post date: [April 10, 2012, 5:54pm UTC](https://forum.servoy.com/t/cancel-new-records-doesnt-work/15793/1 "2012-04-10T17:54:38Z")

</div>

When you try to cancel a new record, this is always saved. The rollback is never done because the new record is never inserted in the _openEdits_ array.  
The problem is in the _dc\_new_ method in the _svy\_nav\_base_ form, _setFormToEdit_ method is called before creating the new record, so it’s not found when doing rollback.

Callign _setFormToEdit_ method after creating new record solves the bug.

---

<div class="post-metadata">

### Author: ![sanneke](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@sanneke](https://forum.servoy.com/u/sanneke)
#### Post date: [April 13, 2012, 9:25am UTC](https://forum.servoy.com/t/cancel-new-records-doesnt-work/15793/2 "2012-04-13T09:25:12Z")

</div>

This is already fixed in the new version.

---

<div class="post-metadata">

### Author: ![DannyC](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@DannyC](https://forum.servoy.com/u/DannyC)
#### Post date: [April 13, 2012, 2:08pm UTC](https://forum.servoy.com/t/cancel-new-records-doesnt-work/15793/3 "2012-04-13T14:08:38Z")

</div>

Ok, thanks
