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
Pradeep JonnalagaddaPradeep Jonnalagadda 

Self Registration page -Argument Cannot be null error message

 I have a requirement to add two new fields for the Self-registration process for Communities. In addition to showing the email, firstname and lastname, I need to show the contact department and contact phone number. I get the following cryptic error when I do this. The process works for any fields created on User. But on Contact it doesn't work. I have turned on the debug logs but don't see any error message. I also checked if the object and FLS permissions exist for the community guest user profile on Contact.
User-added imageUser-added image
Community workspace (Self Reg Config)
User-added image
I created the fieldset as per the documentation here. Adding new fields (https://developer.salesforce.com/docs/atlas.en-us.externalidentityImplGuide.meta/externalidentityImplGuide/external_identity_collect_additional_fields.htm)
User-added imageI could create a flow to update the user fields to contact but I would like the process to work for any custom fields created on Contact which will not exist on User.
 
AnudeepAnudeep (Salesforce Developers) 
I have seen similar issues in the past

Related object fields should not be included in the Field Set to be used in self register component in a community, since it is a self register page it make sense to only include user field.

Using a Community Builder Self Registration page with a User Object Field Set to define additional fields to collect in Registration. If that field set contains field from any related object, we will receive the error "Argument cannot be null" upon submitting registration and User is not created, for example if we include a field from the related Contact object, error will occur and user is not created.

Document link for reference.

https://developer.salesforce.com/docs/atlas.en-us.externalidentityImplGuide.meta/externalidentityImplGuide/external_iden

Did you try reaching out to support?