# Trying to delete fields in BO or using FieldDefinitionService throws error

**URL:** <https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [October 1, 2019, 4:19pm UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131 "2019-10-01T16:19:30Z")\
**Posts on this page:** 6\
**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:** [October 1, 2019, 4:19pm UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/1 "2019-10-01T16:19:30Z")

</div>

Hi,

I’m, trying to recreate some fields that we had missing translations for.

When trying to delete the fields in BO, or by code in the DefinitionSetup.cs file I get

`The instance of entity type 'FieldDataEntity' cannot be tracked because another instance with the same key value for {'OwnerId', 'Id', 'Culture', 'Index', 'ChildOwnerId', 'ChildIndex'} is already being tracked. When attaching existing entities, ensure that only one entity instance with a given key value is attached. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the conflicting key values.`

Trying to run Update on the field results in error that it cannot change culture on fields even though the field in question does not have multi-culture enabled.

I tried to remove the fields from the website template to be sure that was not the issue but it still throws the said error.

Any ideas?

Best regards  
Artur O.

Litium version: 7.2.3

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [October 2, 2019, 7:16am UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/2 "2019-10-02T07:16:03Z")

</div>

Any difference if you restart IIS?

---

<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:** [October 3, 2019, 8:43am UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/3 "2019-10-03T08:43:05Z")

</div>

Nope.

Restarted SQL server and the dev machine several times. Also did clean and redeploy etc… everything i can think of.

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [October 3, 2019, 8:45am UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/4 "2019-10-03T08:45:10Z")

</div>

Can you try removing the data stored for the field and then deleting the field?

There exists a bug that sounds similar to your issue:  
[https://docs.litium.com/support/bugs/bug\_details?id=46434](https://docs.litium.com/support/bugs/bug_details?id=46434)

---

<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:** [October 3, 2019, 1:03pm UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/5 "2019-10-03T13:03:03Z")

</div>

This was it,

Guess we can also confirm it for for the WebsiteTemplate part.  
Had some text content / links in other language on a website template. The moment i removed the contents i could remove the fields in BO.

Thank you for the help.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [October 31, 2019, 1:03pm UTC](https://forum.litium.com/t/trying-to-delete-fields-in-bo-or-using-fielddefinitionservice-throws-error/1131/6 "2019-10-31T13:03:10Z")

</div>

Closed on October 31, 2019, 1:03pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
