Convert String to sObject using Apex in Salesforce Biswajeet November 1, 2017 No Comments on Convert String to sObject using Apex in Salesforce Sample Code: String str = 'Account'; sObject obj = Schema.getGlobalDescribe().get(str).newSObject(); obj.put('Name', 'Test Account'); obj.put('Description', 'About Test Account'); System.debug('sObject - ' + obj); Output: