> For the complete documentation index, see [llms.txt](https://gebra-it.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gebra-it.gitbook.io/wiki/client-api-reference/events/onreturnfrommodal.md).

# onReturnFromModal

The event occurs when a modal child app is closed. This is a good opportunity to refresh some data because the child app might have modified it. Remember: Grids are refreshed automatically if you return from a modal app. The closed app object is available under **eventArgs.details** in the even source code- But be aware, that this app is closed. You can access properties liek appName but you might not use saveConfigRecord or such methods on the closed app.

```javascript
   app.refreshDatasource("orderQuantity");

   console.log("The app: ${eventArgs.details.appName} was closed");
```
