Created
July 2, 2015 14:04
-
-
Save mtetlow/45154749816bdf83bce6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sObject sObj = Schema.getGlobalDescribe().get('Account').newSObject(); | |
sObject sObj2 = Schema.getGlobalDescribe().get('Account').newSObject(); | |
List<sObject> sObjList = new List<sObject>(); | |
sObjList.add(sObj); | |
sObjList.add(sObj2); | |
List<Account> accountList = (List<Account>)sObjList; | |
upsert accountList; | |
//Results in | |
System.TypeException: DML on generic List only allowed for insert, update or delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment