Create Self-Service User automatically

I’m looking to automatically create a self service user (“Production” field on the opportunity layout is set to true), the lookup field to the contact is also on the opportunity layout. the new user should get an email with the login details also.

From what I found out, it is not possible to create SSP user via apex, only via API. I haven’t found out calling API from a field change…any additional info will be helpful.

Answer

I think the API is the only way to create these users.

Generally you could have used a combination of Triggers and email templates to accomplish this. But it appears that we cannot use DML statements (like insert) to create these users.

http://boards.developerforce.com/t5/Apex-Code-Development/How-to-enable-self-service-portal-automatically/td-p/202304

I have not tried creating these users from the API. A post in this thread suggests that even this may not be possible.
http://boards.developerforce.com/t5/Apex-Code-Development/Testing-with-Self-Service-Portal-Users/td-p/264841

Attribution
Source : Link , Question Author : Itay B , Answer Author : Richard N