Novunex Community

Forum References deleted from existing Reference Arrays

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #788
    Lilian
    Participant

      Dear all,

      recently, I deleted some records from an entity type, that is used for some reference arrays.
      Now, when trying to access the entity type containing these reference arrays, I do get an “Entity could not be found error”.
      Have I done anything wrong?
      Why was I able to delete the record? I tried deleting references before, but it did not work…

      Regards,
      Lilian

      #789
      Lisa
      Participant

        Hi Lilian,

        when using references in arrays, the references are saved as a string and therefore not recognized as a reference.
        Since the references are saved differently when they are in an array, you can delete the reference without getting an error.
        The error occurs a little later, when you try to access the entity record, where the reference was saved in.

        If you would like to delete some records you do no longer need, you could check the records of the entity types (where you use the reference) first.
        As soon as you checked, and you know that you don’t use the records within a reference array, you can delete them.

        However, if it happens that you get into the situation you are currently in, and you can no longer access an entity type via the Data Editor or Data Explorer, you can do the following:
        1. Create a Data Query to get all potentially affected records
        2. Compare the Ids in the reference array with the Ids of the entity type (from where you deleted the records)
        3. Go to the Entity Type Editor and switch the Reference attribute type to Short String, and click on Save
        4. Go to the Data Editor and open the affected Entity Type
        5. Remove the invalid entries from the affected attributes and click on Save.
        6. Go back to the Entity Type Editor and switch the Short String attribute type back to Reference, and click on Save

        Please note to select only the smallest amount of records that is possible, when updating data via the Data Editor.
        As soon as you click on Save, the records that are displayed on the screen will be saved.

        Hope I was able to help,
        Lisa

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.