I am looking for a way to create custom field from Apex.
Use case: we are using a specific field (E.g.: Own_Id_Field__c, TEXT(255), ExternalID: TRUE).
User should be able to select which (Custom) Object they want to use in the app and this should create custom field (for good functioning).
I would like to do someting like:
public static Schema.DescribeFieldResult createOwnIdField(String sObject) {
// Test if sObject exists
// Create field
return field;
}
I heard about using Metadata API but did not really understood.
41, that is being used by a lot of ISV's as well. – Raul Jan 26 '18 at 12:59