
Announcements
I am developing a Power Pages portal and facing an issue retrieving records from a custom table (mkd_planning) using the Portal Web API. By design, users should only see "Plannings" related to a "Session" they have signed up for.
Data Model & Logic:
The relationship chain is a bit complex. Here is the flow from the User to the Planning records:
mkd_learner): Related to Contact via mkd_linked_contact.mkd_submission): This is the junction table representing a signup. It connects a Learner (via mkd_linked_learner) to a Session (via mkd_linked_session).mkd_session): The parent event.mkd_planning): The child records I need to fetch. These are related to the Session via lookup mkd_assignedsession.Current Status:
The Web API works perfectly for the first few levels of this chain.
GET /_api/mkd_learners → Returns only the logged-in user's learner record (Success).GET /_api/mkd_submissions → Returns only the submission for that learner (Success).GET /_api/mkd_sessions → Returns only the session linked to that submission (Success).The Problem:
When I try to go one step deeper to fetch the plannings (GET /_api/mkd_plannings), I get this error:
{
"error": {
"code": "9004010D",
"message": "Common Data Service error occurred.",
"cdscode": "0x80040216",
"innererror": {
"code": "0x80040216",
"message": "entityRelationshipRole for given navigation property not found"
}
}
}
My Table Permission Configuration:
I am using a chain of Child Table Permissions in the Portal Management App. All 4 permissions are assigned to the same Web Role ("Authenticated Users").
mkd_learner
mkd_linked_contact).mkd_submission
mkd_session
mkd_submission_mkd_session (Session is looked up on Submission).mkd_planning
mkd_planning_AssignedSession_mkd_sessionTroubleshooting Steps Taken:
mkd_planning) to Global access. The API immediately returned the records successfully. This confirms the API is enabled, the Entity Set Name is correct, and the data exists.mkd_planning_AssignedSession_mkd_session.Question:
Why does the Power Pages Web API fail to resolve the relationship role (0x80040216) specifically at the 4th level of this hierarchy? Is there a limit to how deep permissions can cascade for the Web API, or is there a specific relationship naming convention I am missing?