Self registration using Site.createExternalUser does not apply ARO on the first user
Last updated 2019-09-07 ·Reference W-5886473 ·Reported By 0 users
If a user is created by self registration using the Site.createExternalUser method on an account with no community users, the "PersonAccount" role is not applied to this first user.
- Community user is created with the shared person account role through account role optimization.
- Community user is created with the customer user role.
1) Create a dev edition org.
2) Create an Apex class called "TestAROUserBuild" to call the Site.createExternalUser method.
3) Create a Lightning Component called "TestAROSelfReg" that accepts a ContactId and an AccountId to pass to the controller.
4) Go to Setup | Communities Settings. Enable communities.
5) Onces the communities domain is done propogating. Go to Setup | All Communities.
6) Create a new community with the Napili service template. Name the community however you want.
7) Once the community is created, go to the Administration tab for the community. Go to Login & Registration tab.
8) Scroll down and enable "Allow external users to self-register". Make sure the Registration Page Type to "Community Builder" and value "Register".
9) No go to the Community Builder. Switch the page from "Home" to the "Register" page.
10) Add the lightning component "TestAROSelfReg" below the standard registration fields.
11) Publish the site and activate it.
12) Go to Setup | Sharing Settings. Enable "Use person role for first user in community account"
13) Go to the Accounts tab and create a new account.
14) On the new Account's record page, scroll down until you see the contact related list.
15) Create a new contact.
16) Copy and paste the ids of the Account and Contact into a text editor for easy access.
17) Go to your communities url in another browser (basically a browser where you aren't already logged in).
18) It should show a login page. There should be a link called "Not a member?". Click that to go to the Register page.
19) Fill in the Account Id and Contact id fields with the id's you created in the Account and Contact Setup section. Clic
- No workaround at this time
Reported By (0)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.