3

In a Visualforce page I am outputting fields of ContentNote (such as "CreatedDate") using the same pattern that already works for Note (and many other types) where the sob is a reference to the SObject:

<apex:repeat value="{!noteFields.names}" var="f">
    <apex:column value="{!noteWrapper.sob[f]}"/>
</apex:repeat>

but for any field of ContentNote this error is logged:

System.VisualforceException: Read access denied for ContentNote, controller action methods may not execute.

and the page reports "Insufficient Privileges".

I see nothing that can be set in a profile (and am using a "System Administrator" profile). Also I can (painfully) work around this by indirecting through methods in the wrapper.

Can anyone explain what is going on here?

6
  • Did you check that the current user has salesforce crm Content User Permission? Aug 8, 2018 at 9:22
  • @PremAnandh Thanks for the comment. I just checked the SA profile I am using and "Manage Salesforce CRM Content" is checked as is every other permission that has the word "Content" in it. So I think the answer to your question is yes.
    – Keith C
    Aug 8, 2018 at 10:09
  • Is it possible to paste your controller code ? Aug 8, 2018 at 10:33
  • @PremAnandh Not easily as it is spread across multiple classes. I think it is a Visualforce problem not an Apex one based on the message.
    – Keith C
    Aug 8, 2018 at 10:46
  • check for your notes weather it is private or not. Aug 8, 2018 at 12:06

0

You must log in to answer this question.

Browse other questions tagged .