I have a custom Command with a mostly-working Visibility formula. The formula works fine when a form is first opened.
Clicking the command successfully Patches the underlying record, so that the command's Visible property should now be False. But the command remains visible. The field in question shows as changed in the Form, so the form is seeing the record update.
I have to leave the form and re-enter in order to confirm that the command is now invisible.
To fix the bug, I've tried calling PowerFX 'Refresh()' on the data source, but this does not help.
How does one get the command bar Visible formula to work properly?