function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SoulsSouls 

No such column 'IsPortalEnabled' on entity 'User'

I have problems using the IsPortalUser flag on the User object in Apex.

 

This line gives the error:

List<User>lstUsers=[select Id, IsActive, IsPortalEnabled from User where IsActive=true and IsPortalEnabled=true];

 

We are on Enterprise Edition with Customer Portal licenses in our org.

 

The select statement works in the Development Console and in the Eclipse Salesforce Schema query interface

 

Any ideas?

 

/Mats

Abhi_TripathiAbhi_Tripathi
Hey,

This field "IsPortalEnabled" is only available if partner relationship management (partner portal) or Customer Portal is enabled, OR if Communities is enabled and you have partner portal, Customer Portal, or High-Volume Portal User licenses.

Regards,
Abhi Tripathi
Salesforce Developer
Dave Seidman 48Dave Seidman 48
Since OP said org has Customer Portal licenses, and I'm experiencing the same problem, and my org has Communities enabled and Customer Portal licenses, the above answer isn't helpful. Expected behavior is that IsPortalEnabled should exist. So, again, why would one get this error?