I have the following situation:
In a custom entity form, I have 2 tabs. In the first tab, there is an option set field. Based on a particular value that is chosen, a field in the other tab gets set to required and vice versa.
Now, when I load the form and change the option set field WITHOUT toggling to the second tab, it sets the field required / unrequired as expected.
However, as soon as I switch to the second tab, then switch back to my first and change the option set field again, the 2nd tab field no longer updates. I can see the code fetching that control and setting the requirement level through the debugger, yet the save / form does not reflect the field's updated requirement status. I've also tried doing this through a tabonchange event, but see the same behavior and that is not desirable anyways.
Note that everything works fine if both fields are in the same tab, but the requirement is to have them in separate tabs.
Has anybody seen this behavior? It seems like a bug, but I'm not sure. If there are workarounds, I would appreciate it! Business rules won't work because this logic needs to be in place before the record is saved.