'Navigation element not found' error when two instances of the same service are created
Modified on: Fri, 17 Nov 2023 12:07 PMOriginal Publishing Date:
2020-01-22
2020-01-22
Symptoms
I have an application that works fine until I create two instances of the same resource, after that navigation via aps.apsc.gotoView stops working, an error
"Navigation element not found (View: http://example.org//application/account.edit-notify#41;"
is displayed.
Cause
Resource instance identifying information is not sent to view, as a result POA cannot render it.
Resolution
Pass resource id to aps.apsc.gotoView via a variable:
aps.apsc.gotoView("account.edit-notify", aps.context.vars.account.aps.id);
Note: variable 'account' has to be defined in navigation in APP-META.xml
.
More on navigation in documentation.