# What is the right way to extend Order View?

**URL:** <https://forum.shopware.com/t/what-is-the-right-way-to-extend-order-view/59134>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [17. April 2019 um 12:25 UTC](https://forum.shopware.com/t/what-is-the-right-way-to-extend-order-view/59134 "2019-04-17T12:25:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![miro](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@miro](https://forum.shopware.com/u/miro)\
**Post date:** [17. April 2019 um 12:25 UTC](https://forum.shopware.com/t/what-is-the-right-way-to-extend-order-view/59134/1 "2019-04-17T12:25:20Z")

</div>

Hi,

I want to extend Order view and add custom button in it, dynamically, depends from custom order field

I got a subscriber. In it I use: ‘Enlight\_Controller\_Action\_PostDispatchSecure\_Backend\_Order’ =\> ‘onOrderPostDispatch’. In&nbsp;onOrderPostDispatch I check for&nbsp;ActionName to extend.

But when I use&nbsp;getActionName ==&nbsp;‘load’ the order id is not set, ‘load’ fires when I get orders list, may be early. If I use getActionName&nbsp; == ‘loadStores’, I have order id, and get the data from the DB, but it looks like at this step is too late to extend the overview.js, how can I do it?

I need a place where is the right moment to extend and in same time to be able to get the order Id.

Best regards!
