# Generating fields and overriding current with same ID

**URL:** <https://forum.litium.com/t/generating-fields-and-overriding-current-with-same-id/731>\
**Category:** Questions\
**Tags:** accelerator, litium-7\
**Created:** [March 19, 2019, 2:39pm UTC](https://forum.litium.com/t/generating-fields-and-overriding-current-with-same-id/731 "2019-03-19T14:39:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artur](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/artur/32/948_2.png) [@Artur](https://forum.litium.com/u/Artur)\
**Post date:** [March 19, 2019, 2:39pm UTC](https://forum.litium.com/t/generating-fields-and-overriding-current-with-same-id/731/1 "2019-03-19T14:39:32Z")

</div>

Hi,

I have created custom blocks and fields. However i got issues with updating/removing existing ones.

I create Fields in  
`BlockFieldDefinitionSetup.cs`

I got this resource: [https://github.com/LitiumAB/Education/tree/master/Developer%20Education/Bookstore/Author%20page](https://github.com/LitiumAB/Education/tree/master/Developer%20Education/Bookstore/Author%20page)

```nohighlight
Open \Src\Litium.Accelerator\Definitions\DefinitionSetup.cs
In the method InitTemplates() 
locate the IsAlreadyExecutedCheck and just comment out continue, 
now your template will update from code on every restart

```

I know this somewhat works? But feels irregular. I have cleaned the proj, restarted and recycled website on IIS but it still fails to generate my updated blocks. Am I missing something?

I can add that doing below works but is there any better way to update fields in blocks? (Either in BO or via Code)

```sql
DELETE FROM [Common].[Setting]
Where 
[Key] Like 'acceleratorbuilder:litium.products.category:%' OR
[Key] Like 'acceleratorbuilder:litium.fieldframework.fielddefinition:blockarea:%

```

Litium version: 7.1
