# Refresh detail view after update

**URL:** <https://community.forestadmin.com/t/refresh-detail-view-after-update/858>\
**Category:** Help me!\
**Created:** [August 25, 2020, 7:55am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858 "2020-08-25T07:55:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonije\_Pavlovic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/antonije_pavlovic/32/702_2.png) [@Antonije\_Pavlovic](https://community.forestadmin.com/u/Antonije_Pavlovic)\
**Post date:** [August 25, 2020, 7:55am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/1 "2020-08-25T07:55:52Z")

</div>

Hi,

We have a problem with update action. Our entity has several fields, we change one and save but as business logic side effect another field changes value also. The problem is that after performing a successful update on the entity details page only field that we have changed is updated and not also the dependent one. If we refresh the page, all values are updated. Is there a way to reload the entity details page after performing an update?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [August 25, 2020, 8:21am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/2 "2020-08-25T08:21:10Z")

</div>

Hi @Antonije_Pavlovic and welcome 🍾 ,

Could you share a video so I can better understand what you want 👼?

---

<div class="post-metadata">

**Author:** ![Antonije\_Pavlovic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/antonije_pavlovic/32/702_2.png) [@Antonije\_Pavlovic](https://community.forestadmin.com/u/Antonije_Pavlovic)\
**Post date:** [August 25, 2020, 9:33am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/3 "2020-08-25T09:33:34Z")

</div>

Hi Vince,

Features permissions are computed field and it is not editable. When we add a feature to additionalFeatures backend logic adds it to features permission field. This change is not reflected after save and we need to perform refresh, you can see it in the attached video.

You can access video on the following link: [https://imgur.com/55polCY](https://imgur.com/55polCY)

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [August 25, 2020, 9:36am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/4 "2020-08-25T09:36:33Z")

</div>

Okey it’s pretty clear now.  
Did you override the route ? Or is it a smart field ?

---

<div class="post-metadata">

**Author:** ![Antonije\_Pavlovic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/antonije_pavlovic/32/702_2.png) [@Antonije\_Pavlovic](https://community.forestadmin.com/u/Antonije_Pavlovic)\
**Post date:** [August 25, 2020, 9:49am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/5 "2020-08-25T09:49:52Z")

</div>

We have overridden route and we are calling our API that performs update.

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [August 25, 2020, 12:19pm UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/6 "2020-08-25T12:19:00Z")

</div>

Okey then can you share this overridden route it might miss a piece of code 😉

---

<div class="post-metadata">

**Author:** ![Antonije\_Pavlovic](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/antonije_pavlovic/32/702_2.png) [@Antonije\_Pavlovic](https://community.forestadmin.com/u/Antonije_Pavlovic)\
**Post date:** [August 25, 2020, 2:51pm UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/7 "2020-08-25T14:51:33Z")

</div>

```javascript
const { organizations } = require('../models');
const { RecordUpdater } = require('forest-express-mongoose');

router.put('/organizations/:id', async (request, res) => {
  const recordUpdater = new RecordUpdater(organizations);
  const recordToUpdate = await recordUpdater.deserialize(request.body)

  const id = recordToUpdate._id;
  delete recordToUpdate._id

  await moleculer.call('iam.organization.update', {
    filter: {
      _id: id,
    },
    update: recordToUpdate
  });

 res.status(200).send('Organization updated')
});

```

---

<div class="post-metadata">

**Author:** ![anon62739609](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@anon62739609](https://community.forestadmin.com/u/anon62739609)\
**Post date:** [August 26, 2020, 8:21am UTC](https://community.forestadmin.com/t/refresh-detail-view-after-update/858/8 "2020-08-26T08:21:31Z")

</div>

Okey so the issue is here. Look at the [documentation](https://docs.forestadmin.com/documentation/reference-guide/routes/default-routes#update-a-record)  
You must return the record to update it. Here you just return `Organization updated`

```javascript
router.put('/organizations/:id', async (request, res) => {
  const recordUpdater = new RecordUpdater(organizations);
  const recordToUpdate = await recordUpdater.deserialize(request.body)

  const id = recordToUpdate._id;
  delete recordToUpdate._id

  await moleculer.call('iam.organization.update', {
    filter: {
      _id: id,
    },
    update: recordToUpdate
  });

 const recordSerialized = await recordUpdater.serialize(record);
 res.send(recordSerialized);
});

```

Try that and tell me if that fixes your issue 😉
