We have a custom FormDialog (standard combination of xml and cs file that inherits DialogForm) that appears when a custom button in the Content Editor ribbon is clicked. Using some user input, the form creates an item relating to the current selected context item, but does not affect the item directly.
We have a content editor warning that appears on the the context item when it has one of these associated items created for it, but we're finding that the warning doesn't appear until after the user manually clicks on the item again, effectively "reloading" the item. We want the content editor to automatically "refresh" AKA reload the item, ideally as part of the FormDialog's required "OnOk" method (inherited from the DialogForm class) or something that makes sense for when the form's server side functionality is performed.
All suggestions we've seen so far have pointed to the following command:
string load = $"item:load(id={item.ID},language={item.Language},version={item.Version})";
With the following implementation:
Context.ClientPage.ClientResponse.Timer(load, 0 )
However, we're seeing nothing occur when using this code, implemented just before calling base.OnOk(sender, args)
. The command clearly gets passed in, according to breakpoints set in Sitecore's related .js
file, but the desired action doesn't seem to be happening.
Are we approaching this wrong? Are we seeking something inherently not intended to be support through DialogForms?