You need to sign in to do that
Don't have an account?
force24
Delete Contact ID associated with customer portal user?
Is there any way to delete the contact record associated with a customer portal user?
I'm using a customer portal to self-regiser and authenticate users for a Force.com Site. The self-registration process creates both a user and contact record, as expected, but it seems there's no way to diassociate the contact record from the user record and to delete the contact - even for de-activated users...
Thanks
Hi,
You have to set the contactid field to null first and then delete the related contact.
Hope this helps...
Ispita,
Thanks for your reply.
I did try setting User.ContactId to null (using "Execute Anonymous" in the Force.com IDE; I am a System Admin for the org) -- but it doesn't work. The field User.ContactId is not updateable...
Hi,
You could use apex data loader to do the same. First export the users, and delete the associated contacts. Then do an upsert of the users. Now you can export the contacts and do a delete operation.
Thanks.
On the User record, set "IsPortalEnabled" = FALSE. This automatically sets "IsActive" = FALSE at the same time, and removes the link to the associated Contact. It severs the connection that restricts you from deleting the Contact records.
You need to do this from a data tool (DemandTools, Data Loader, Informatica, etc.). You need to export a report of the records you want to affect with the data tool. The report needs to have the User ID and the Contact ID (I had to build a custom report type). It will be hard to get the Contact IDs after doing the update to the User records since the connection is severed.
- John
Hope that helps someone!