You need to sign in to do that
Don't have an account?
nishad basha 7
How to create a user using visualforce page and create a form with 6 user fields and fill remaining fields in controller when i click submit button new user should be created?
user is created in salesforce after that creating visualforce page with a form and add 6 user fields remaining fields in controller when i click submit button new user should be created.how to solve the above solution please give some examples.
User mike = new User();
mike.ProfileId = '00Ee0000000LhpB';(your profile id);
mike.Username= 'mike.white@company.com';
mike.Email = 'mike.white@company.com';
mike.Lastname = 'mike'; mike.Firstname = 'white';
mike.Alias = 'mwhite';
mike.CommunityNickname = 'mwhite01';
mike.UserRole = [ select id from userrole where id ='00Ee0000000LhpB' ];
mike.Profile = [ select id from profile where id = '00ee0000000Hfng' ];
mike.CurrencyIsoCode = 'USD';
mike.TimeZoneSidKey = 'GMT';
mike.LocaleSidKey = 'en_US';
mike.EmailEncodingKey = 'ISO-8859-1'; mike.LanguageLocaleKey = 'en_US';
mike.UserPermissionsMobileUser = false; System.debug ( JSON.serializePretty( mike ) ); insert mike;