The checkPageSafeToDisplayNotLoop() method tests if the provided form id matches the current form id or any of its parents.

If the specified form id is not found in the current browser form the function will proceed searching up the HTML DOM hierarchy until it either finds a match or it runs out of form elements.

Syntax

bapi.helper.checkPageSafeToDisplayNotLoop(checkPageId, currentPage)

Parameters

checkPageId

The test page id.

currentPage

The browser page object where the request is being ran.

Return Value

A boolean value: true if the id matches the current page id or its parent pages and false if it doesn't.

Example

// test for page id in the current form and all parent forms:
// where CURRENT_BROWSER_FORM.form.id is 303257
bapi.helper.checkPageSafeToDisplayNotLoop(303257, CURRENT_BROWSER_FORM)

Result

true