Custom Screen Navigation

Hello,

I have a screen that after putting in parameters, and clicking a button, will directly display the screen. however, the navigation at the top of the screen is not the way I would like it.

image

I do not want the ‘Audit Batch Creator’ in the navigation link, just 'Audit Batch Browser > Adhoc Audit

How can I adjust this? I open the screen using

AdhocAudit adhocAudit = screenBuilders.screen(this)
                .withScreenClass(AdhocAudit.class)
                .withAfterCloseListener(e -> closeWithDiscard())
                .build();

setupDataInAdhocAuditScreen(adhocAudit);
        try {
            adhocAudit.show();
        } catch (Exception e) {
            logger.error("Exception at adhocAudit.show, error={}", e.getMessage(), e);
        }

I also tried

AdhocAudit adhocAudit = screens.create(AdhocAudit.class);
setupDataInAdhocAuditScreen(adhocAudit);
adhocAudit.show

but same result.

Any ideas?

Hello,

One way to get the desired navigation link is to close the “Audit Batch Creator” screen before opening “Adhoc Audit” screen. Example:

        addAfterCloseListener {
            var adhocAudit = screenBuilders.screen(this)
                .withScreenClass(AdhocAudit.class)
                .withAfterCloseListener(e -> closeWithDiscard())
                .build();
			setupDataInAdhocAuditScreen(adhocAudit);
			adhocAudit.show();
        }
        close(WINDOW_CLOSE_ACTION)

This works, thank you!