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
as6as6 

how to create a developer account programmatically in apex

I wish to use apex code to create developer account. Please guide me on how I can do this.

mike1983mike1983

That is super messy and would cause tons of problems, for example how will you enter an email address of a new user programatically. Even if you could by pinging some off site data base I cant imagine it will save you any time at all. You could use data loader and create a CSV then upload it in one bulk group but you would still have to enter all the info into the CSV which unless you write code to do that from some database you currently have I cant see it saving you much time at all.

 

Are you really creating that many developer accounts (from an existing data source) that it would matter?

ThomasTTThomasTT

I don't know what you meant by 'a develoepr account', but if it's about a user, you just use Apex DataLoader and load User records (of couse, you need enough licenses).

Of couse, you need to prepare the data, with all required fields, profile ID, locale, everything. It's just a Excel work.

I don't see any problem with it. That's we usually do for client's all users.

 

And yes, of couse you can do it from Apex like a Force.com IDE. Just create a User object and insert it. You may want to use for loop and create sequential data, but since it's annoying to specify all required values, I recommend to export a existing user and do a Excel work and import (insert or upsert) it.

I don't know you can do that from VF controller or trigger but that what I don't recommend.

 

ThomasTT

Message Edited by ThomasTT on 09-30-2009 06:38 PM