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
Neelam SinghNeelam Singh 

​At user level why i can save the user without selecting any value from Role as Role is a mandatory field

Can anybody tell me:
At user level why i can save the user without selecting any value from Role as Role is a mandatory field.
I know the default value is <Not Specified>
This is a question asked in interview and interwier is also searching for the correct answer
Neelam SinghNeelam Singh
Role is a required field with red mark on Users Page layout.
RishavRishav
Hii Neelam,

It's very funnly that your interviewer is also searching for answer. please tell him/her this answer. 
At user level this role mandatory field behave in different manner. 
I have one scenario
1. suppose you are an administrator and u want to create some normal salesforce user then u can do this without choosing the ROLE field . 
   Even administrator works without any role. 
2. Now you are an admin and u  want to create some "Community user(Ex: customer community, partner community)" then in this case at first salesforce won't allow to create any community user , what u will have to do is , you will have to go back to your user details and you will must have choose a "ROLE" for yourself or for any other users to whom u have given authority to create the community user. After choosing the role only u wil be able to create community user. 

so remember , if u want to create comunity users you will have to choose role.

Hope it will help u 

Thanks 
Rishav