Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Admin Action Extension target object update

Admin Action Extension target object update

antquint
Shopify Partner
2 0 3

Hi,

 

I'm developing an Admin UI Action Extension that will create and add a specific product to the Draft Order being edited. All is working fine - the product is created and added to the draft order - but the problem is that the Draft order doesn't update its items after the extension dialog closes. I need to manually refresh the Admin Draft Order Detail page so that the new item appears. Is there a way to refresh the Draft Order when finishing the extension action?

Since the extension runs in a sandbox it seems that even doing a location.reload() doesn't work... Any Ideias would be appreciated. Thanks!

Replies 3 (3)

friendscottn
Shopify Partner
26 3 17

Thanks for posting this. I had the same problem.

You can track the github issue progress here:

https://github.com/Shopify/ui-extensions/issues/2234

Here's a similar post with some additional info:

https://community.shopify.com/c/extensions/save-refresh-page-on-admin-action-admin-ui-extension/m-p/...

 

friendscottn
Shopify Partner
26 3 17

Oh and also the only workaround I found was to use a <Link> element so the user can click to manually reload the page themselves. For now links are the only way to navigate pages as far as I can tell. Let me know if you find a better solution though. Hopefully Shopify will add the navigation api to Admin Actions and expand it's functionality beyond navigation between blocks and actions.

antquint
Shopify Partner
2 0 3

Thanks Friendscottn! I was starting to think that I was the only one with this problem.  And thanks for the <Link> suggestion, I might explore it as it can improve a bit the UX.