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.
bapi.helper.checkPageSafeToDisplayNotLoop(checkPageId, currentPage)
checkPageId
The test page id.
currentPage
The browser page object where the request is being ran.
A boolean value: true if the id matches the current page id or its parent pages and false if it doesn't.
// 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