Problem with navigation between records in multi-step (tabs) form

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!

I think you should try coding an Ajax OnChange event for the field in the Tab A indicating when the Tab B is required.

Thank you for the reply!

I have tried to put the relevant code into an Ajax onChange event for the primary key for the record, but it does not help, unfortunately.

Note that in a different form, where the presence of the 2nd tab depends on a checkbox in the first tab, it works without a problem.

My problem is with navigating between different records directly, via the little arrows in the toolbar. In that case, the blocks are at least hidden as needed, but the tabs they are in are neither hidden when needed nor shown when needed. They remain the same as they were for the first record to be opened.