You need to sign in to do that
Don't have an account?
Aakriti Goyal
SOQL INVALID_FIELD error on User.ProfileId for Salesforce Platform User
Hi,
We have a running application that has a custom lightning component to create partner users. User is successfully created in the context of System Admin. But when trying to create a partner user in the context of a salesforce platform user, we get an INVALID_FIELD error on the ProfileId field of the user.
After looking into existing questions, I found that "View Setup and Configuration" permission is required to access a profile on the user object. Even after enabling the permission on the profile level, the User gets the same INVALID_FIELD error for the profileId field of the user object.
Is there any other permission required to access profileId field of User object?
We have a running application that has a custom lightning component to create partner users. User is successfully created in the context of System Admin. But when trying to create a partner user in the context of a salesforce platform user, we get an INVALID_FIELD error on the ProfileId field of the user.
After looking into existing questions, I found that "View Setup and Configuration" permission is required to access a profile on the user object. Even after enabling the permission on the profile level, the User gets the same INVALID_FIELD error for the profileId field of the user object.
Is there any other permission required to access profileId field of User object?
Can you also provide 'Manage Internal Users' and 'Manage External Users' permission?
Please see this post to learn more
Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
I suggest raising a support case to confirm this behavior
Also, what do you see when you run the following code as the user?
For issues like this, I have seen everyone ensure there is field accessibility/field level security in general. However, I don't think we can give access to profileId