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
e r i c.ax249e r i c.ax249 

Update via API or Apex the "Record Type Selection" flag for users?

The "Record Type Selection" option is under "Personal Setup"->"My Personal Information".  It basically allows the default Record Type to be selected automatically when creating a new record.  Is there any way I can update this preference programmatically, either through the web services API or Apex?  We basically want to give users access to a new record type, but do not want them to be prompted for record type selection when creating a new record.  We would like to set this option automatically without having the users set it themselves.

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

There's no access to these flags through any API that I'm aware of. You'd have to actually log in as these users and set the box yourself. Alternatively, you could create a VF page to override the action(s) you're interested in taking over (most likely the New and Clone buttons), and set the "record type selection" box to not show the record type selection screen. From here, it would be trivial to redirect to the standard page (using URLFOR or the "nooverride" page parameter) to land them on the new page with the record type pre-selected.

All Answers

sfdcfoxsfdcfox

There's no access to these flags through any API that I'm aware of. You'd have to actually log in as these users and set the box yourself. Alternatively, you could create a VF page to override the action(s) you're interested in taking over (most likely the New and Clone buttons), and set the "record type selection" box to not show the record type selection screen. From here, it would be trivial to redirect to the standard page (using URLFOR or the "nooverride" page parameter) to land them on the new page with the record type pre-selected.

This was selected as the best answer
e r i c.ax249e r i c.ax249

Thanks for the quick reply.  We overrode some buttons a long long time ago with S-Controls and the option to skip the record type selection page doesn't appear.  I didn't know that if you select VisualForce, the option appears.  This works.  Thanks again.