Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I am trying to create a custom report based on a single document selection which shall display the following information:
The report shall create a Table, where:
The table shall look like this:
No | Content Node ID | Project #1 | Project #2 | ... all Projects |
#1 | 123 | 456 (Content node ID of Branched Item for 123 in Project #1) | ||
#2 | 234 |
| 789 (Content node ID of Branched Item for 234 in Project #2) |
|
... | ... all content IDs |
My Report Recipe looks as follows:
<%begindetail%>
<!-- All Projects -->
<%beginrelationshipsdetail Query[(field[Type]="Project")]%>
<script>
project = "<%Relationship Project%>".trim();
if (project.startsWith(projectPrefix) && project != (projectPrefix + "Garbage"))
projects.push(project);
</script>
<p><%Relationship Project%></p>
<%endrelationshipsdetail%>
<!-- All nodes of a document -->
<%beginrelationshipsdetail Query[(walkdocordered[<%<%builtin ID%>%>]recurseinclude)]%>
<p><%Relationship ID%></p>
<script>
n = new node(<%Relationship ID%>);
nodes.push(n);
</script>
<%beginrelationshipsdetailL2 <<<BRANCHES>>>%>
<span><%RelationshipL2 ID%>; </span>
<script>
if (!n.branches["<%RelationshipL2 Project%>"]) {
n.branches["<%RelationshipL2 Project%>"] = [];
}
n.branches["<%RelationshipL2 Project%>"].push(<%RelationshipL2 ID%>);
</script>
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>
<%enddetail%>
My code works perfectly fine as long as the executing user has access to all projects, otherwise the user gets the error message: "MKS124814: Cannot show view information: MKS124283: Permission Denied: Item XXX is not visible due to project/type visibility restrictions" for branched content nodes. This is common because items are branched into projects where the current user might not have access to. This error also comes up if an Item within the document was branched from another item where the user has no permission to view the branched item. Although I have no idea why the system would need to walk this item...
Is there one of the following ways to handle this?