You need to sign in to do that
Don't have an account?
createPortalUser Method
Hello Team:
I'm debugging a portal issue trying to create a portal user from a Sites page.
Here is the code I'm trying to execute:
try{
userId = Site.createPortalUser(u, accountId, password, true);
} catch (Exception e){
system.debug(' error in creating User Account ' + e.getMessage());
}
Here is my debug log:
14:43:20.744 (744838000)|METHOD_ENTRY|[118]|01pE0000001gvec|SiteRegisterController.__sfdc_password()
14:43:20.744 (744925000)|METHOD_EXIT|[118]|01pE0000001gvec|SiteRegisterController.__sfdc_password()
14:43:20.745 (745121000)|SYSTEM_METHOD_ENTRY|[118]|system.Site.createPortalUser(SObject, String, String, Boolean)
14:43:20.754 (754125000)|SYSTEM_METHOD_EXIT|[118]|system.Site.createPortalUser(SObject, String, String, Boolean)
14:43:20.754 ()|SYSTEM_METHOD_ENTRY|[138]|System.debug(ANY)
14:43:20.754 (754237000)|USER_DEBUG|[138]|DEBUG| userId == nul
My try is not blowing up but the user is not getting created either. Any ideas?
Thank you,
Hi,
I figured this out my site was set up incorrectly, I needed to associate the site to the correct customer portal. My question here is why wouldn't the API give me a response about how the portal can't create a user??
Thanks,
Ian