function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kris chitkris chit 

Community User Provisioning

Hi All,

I am trying to implement User Provisioning for a Community User. Upon clicking of Submit button, a new Contact and User is created and it should land user on Community home page. But I am seeing Mixed DML Error as I am trying to update a Setup object after updating a non-setup object.

So I tried to make the User Creation into a future call. But the problem is as it is a asynchronous call, it takes time and by that time if it is trying to login and land him on Community Home page, it is throwing error.

So I am planning to make the user creation in the synchronous transaction and create a contact in async call. Just wanted to know are there any limitations in doing that ??

Appreciate your response.