1
votes

Here is the how-to for creating custom objects manually in Salesforce.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_customobject.htm

I would like to know can this be done programmatically and if so via which API?

1

1 Answers

3
votes

You can use Salesforce Metadata API for dynamic creation of objects, fields, etc. In particular, there is createMetadata() method.