# Best way to 'archive' an entity?

**URL:** <https://community.fibery.io/t/best-way-to-archive-an-entity/2284>\
**Category:** Get Help\
**Created:** [December 1, 2021, 6:49pm UTC](https://community.fibery.io/t/best-way-to-archive-an-entity/2284 "2021-12-01T18:49:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Dimitri\_S](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/dimitri_s/32/1683_2.png) [@Dimitri\_S](https://community.fibery.io/u/Dimitri_S)\
**Post date:** [December 8, 2021, 1:16am UTC](https://community.fibery.io/t/best-way-to-archive-an-entity/2284/4 "2021-12-08T01:16:23Z")

</div>

So to give you some context in Google Drive I have a “Clients” folder which has active clients I am currently working with and inside this folder is also an “Archive” folder. When I get done with a client I move their folder into the Archive folder so its out of sight out of mind unless I need it for some reason.

I’m basically trying to replicate this kind of functionality.

In either case I decided to move forward with the “a script which a) moves the entity to another “Archive” space and b) re-establishes the relationships.” approach. A simplified version of how I am doing this is shared here:

> [@Script equivalent of the "Convert to" feature?](https://community.fibery.io/t/script-equivalent-of-the-convert-to-feature/2296/2):
>
> Figured it out but leaving this up here for others reference. Here is my script equivalent of the Convert to feature but with the ability to map to dissimilarly named fields. const fibery = context.getService("fibery"); for (const entity of args.currentEntities) { await fibery.createEntity("Space B/Db Y", { "Person Name": entity["Name"], "Person Salary": entity["Salary"], }); await fibery.deleteEntity(entity.type, entity.id); }

---

_[View the full topic](https://community.fibery.io/t/best-way-to-archive-an-entity/2284)._
