+ Start a Discussion
RotnesRotnes 

Cannot change profile for current user.

I am looking for a way to let a customer portal user  trigger a action which assign him to a different profile.

I have tried with, triggers, @future method, time based workflow but these approaches all leads to the

FIELD_INTEGRITY_EXCEPTION, Cannot change profile for current user.

 

Is it at all possible that a customer portal user activate a profile change for himself? 

Best Answer chosen by Admin (Salesforce Developers) 
RotnesRotnes

Found a nice video on youtube which demonstrate a workaround for the problem.

 

http://www.youtube.com/watch?v=a2fJWeJscps

All Answers

Chris JohnChris John

This is intentional, users should not be able to change their own profile.

 

What's your use case for changing the profile of a portal user?

RotnesRotnes

I would like the portal user to be able to change profile by

accepting different terms og agreement.

My goal is to remove the manual step for internal users in this proccess. 

RotnesRotnes

Found a nice video on youtube which demonstrate a workaround for the problem.

 

http://www.youtube.com/watch?v=a2fJWeJscps

This was selected as the best answer
Sam Hummel 4Sam Hummel 4
I have a similar use case.  I let public users log into my Customer Community with a profile that is fairly restrictive in what it will let users do.  When they put in a confirmation code that verifies they are a customer, I want to give them access to additional functionality.  In other words, I want to switch their profile in response to an action they take *while logged into* the Customer Community, without forcing them to log out and back in, or wait for an internal user to make the change for them.  
Corey SnowCorey Snow
In our org, we have a large number of validation rules, workflow rules, and triggers that have exceptions for certain Users and especially certain Profiles.  We have far fewer restrictions on incoming data from external systems coming in on APIs.  When using a data loader  to perform mass updates, I generally want the Last Modified by to reflect my User, but I also want to get around validation rules.  This means I want to change my own Profile to one that supports API usage better.  If you have Sys Admin level permissions, my favorite workaround is to login as me initially, then use the "Login as" feature to login as a different Admin.  At this point I can change my Profile, run my buk loads as myself, then revert the Profile.