Hot answers tagged

1

If you already have the name, Type.forName can do this. Also, you can use the new(ish) switch statement for better legibility: String jSONSObject = '{}'; String sObjectApiName = 'Account'; Map<String, Object> fieldMap = (Map<String, Object>)JSON.deserializeUntyped(jSONSObject); SObject newSobject = (sObject)Type.forName('Schema',sObjectApiName)....


1

Custom Metadata Types support various relationships. They can have multiple records created against them which would allow you to manage individual mappings. They even allow you to have effectively parent/child relationships. Combining this with Entity Definition and Field Definition type fields would allow you to create the sort of configuration you've ...


Only top voted, non community-wiki answers of a minimum length are eligible