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
Saurabh_RawaneSaurabh_Rawane 

Customer Portal Account Disablement

Hi All,

 

Is there a way i can disable a Customer Portal Account using Apex.

 

Thanks,

Saurabh Rawane

aalbertaalbert

Are you looking to simply de-activate the contacts (ie portal users) related to a specific Account from accessing the Portal? If so, just set the isActive field on the User record to false to de-activate the users. You can find the related Contacts to the Account you, find the related Users associated to those Contacts, and then update the isActive field to false. You can do that operation from Apex. 

 

More information on disabling or deactivating portal access here

appr_custappr_cust

I really need to disable the portal account doing which should automatically deactivate the users. But the reverse is not true. I already tried deactivating the user but the account is still CP enabled.

The field isCustomerPortal on account is supposed to be updateable in summer '09 but my code doesn't even compile if I try to set it to false.

 

is there another way I can disable a customer portal account?

 

Thanks