New answers tagged

2

I tried to retest the performance of the 3 approaches (added getSObjects(SObjectField) approach). Org Params: ApiVersion: 51.0 InstanceName: CS100 IsSandbox: true OrganizationType: Developer Edition Results for 50 trials each of 20.000 calls: Approach MIN CPU (ms) MAX CPU (ms) AVG CPU (ms) STD (σ) acc.Contacts 10.00 16.00 12.63 1.83 acc.getSObjects('...


4

System.schedule() expects the third parameter to be something that implements the Schedulable interface (which Object does not). Provided the class you're dynamically instantiating does implement that interface, you should be able to change from: Object o = objType.newInstance(); to: Schedulable o = (Schedulable)objType.newInstance(); which should be enough ...


Top 50 recent answers are included