Hi everybody!
I am currently working on a (single record) form with multiple pages in the tabs layout and I have an issue when navigating between records directly.
The first tab (“A”) represents the actual record, while another tab (“B”) shows additional information. Since not every record is the same, not every record needs B.
If a record does not need B, I set all its blocks to not display. This way, the tab itself is not displayed either.
This works great when opening the form regularly, from a grid for example.
However, when I try to navigate between records in the form then tab B does not change, regardless of whether the current record needs it or not.
E.g.: If the first record does not need B, it is not displayed (as it should be). But when I navigate to another record, B will never be displayed, even when the other records needs it.
On the other hand, if the initial record has B displayed, it will always be displayed for any record i navigate to, even when completely empty.
I have tried putting the relevant code into any related event (onLoad, where it was originally, onLoadRecord, onNavigate, onRefresh), but to no avail.
This is especially weird, since i can dynamically show or hide a tab/page in a multi-page form by combining sc_block_display in onLoad with the option “Reload form when value has changed” without any problem.
Is there something I am missing here? Thanks in advance!