interesting challenge that would benefit from your wisdom:

Trying to provision a new community user (with preset password) via salesforce when a specific event takes place and trigger fires. I dont want the contact/user notified of anything - they'd just land on the site login, enter their known credentials and session is established.

The contact record exists, the community is active however if I try using Site.createPortalUser then Im told 'nope - that operation is allowed only from within an active site' (so for self registration I assume). Damn. If I try a simple user insert then I get the expected mixed DML error.

Soooo - how on earth does one use apex to provision a new customer community user account from an internal user perspective ?

Any ideas most appreciated!


The resolution to this question was to move the user setup into @future methods.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.