1

I have an app that accesses the API. Both regular users and partner portal users can login to the app. I am doing a query through the API on a custom object but the CreatedBy field returns null when logged in as partner portal user. I verified and profile for user has access to CreatedBy field. Are there any other settings I need to change?

1
  • Have you checked the object level permissions of the user? I once deployed a new custom object and had all the field-level security settings correct, but my users couldn't access anything because I hadn't exposed the object to them... D'oh! You can verify this in Setup>Manage Users>Profiles>[Select Profile in Question]>Object Settings Jul 31, 2015 at 20:20

1 Answer 1

1

This is a common issue in portals and communities. You'll want to check your sharing settings on the User object. Often, in portals and communities, external portal and community users are not permitted to see internal Users in an Org. That's why the CreatedBy is returning null. Those external Users don't have access to your Org's internal Users when viewed from your Portal.

2
  • That seems to be the case. Are you aware of any documentation referencing this?
    – d0001
    Aug 1, 2015 at 18:55
  • Look at the Summer'15 Release Notes. Sharing on the User Object is now respected when "with sharing" is used in a class as of SU15. That's one place that comes to mind. Also take a look at Getting Started with Communities and the Security Implementation Guide. Could be in either place. There are references, but wouldn't know which is best for your purposes.
    – crmprogdev
    Aug 1, 2015 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .