for global or task pages we can do this using below snippet
const pages = await ap.pages.get(); console.log(pages); const newPage = pages.find((el)=> [el.name](http://el.name/**) == ‘Page name’); ap.navigate({ page: newPage pageId: newPage.pageId, name: [newPage.name](http://newpage.name/**) })
how can we get inbox or enquirery page? in custom code?
If you want to route a user to inbox or enquiry page using on custom code.
You don’t have to use ap.pages.get() or ap.pages.getGlobalPages() to get the inbox and enquiry page since they don’t have pageIds since those pages comes with Alpha.
You can just copy the cm url, here is an example below.
let page= "cases”
let url = `https://https://sandbox.neutrinos-apps.com/cm/home/${page}?projectId=`.
window.location.href = url;
The value for page variable can be dynamic between cases for inbox and enquiry for enquiry page.