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
shailja ranjan 8shailja ranjan 8 

can we create a custom object or fields using trigger?

Hi Is it possible to create a new object or new custom fields using apex trigger?
Best Answer chosen by shailja ranjan 8
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi shailja,
No we cannot create objects and fields from trigger.I think it is not possible to create objects from apex.We can only create object records from apex but not objects.
Apex triggers enable you to perform custom actions before or after changes to Salesforce records, such as insertions, updates, or deletions.

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards