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
Rohit2006Rohit2006 

Adding new record to RecordType object using trigger

Hi,
I am trying to write a code inside an APEX trigger to add new record in RecordType object(Default table provided by SalesForce) but this is giving me comple tile error as following

"DML operation is not allowed on RecordType"

Is there any way to insert a new row(entry) in RecordType table from trigger..
Thanks is advance
nothingnothing
DML operations are not supported with the following sObjects in Apex:
  • User**
  • SelfServiceUser
  • Profile
  • Territory**
  • RecordType
  • Translation
  • WebLink
  • BusinessHours
  • BusinessProcess
  • CategoryNode
  • Process*

* You can manipulate these sObjects in the Force.com Web Services API.

** DML statements are supported for these objects when running tests. However, you can only update custom fields. You cannot use INSERT, DELETE, MERGE, UPSERT, and so on.