Newer Version Available

This content describes an older version of this product. View Latest

Create a Headless Registration Handler

Create an Apex class for your registration handler. You reference this Apex class when you configure Experience Cloud settings on the Login & Registration page.
Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions

  1. From Setup, in the Quick Find box, enter Apex, and then select Apex Classes.
  2. Click New.
  3. Fill the class with your headless registration handler code. You can paste in the code from the example.
  4. Save the class, and note its name.

Example

Here’s an example headless registration handler. This registration handler creates a user and links it to the account and profile that you created earlier in this guide.

This sample code is for demonstration only. Always test code before deploying it to a production environment.

Note