-
First error: sObject type 'sObject' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name.
Hi All
I am getting this error while using sObject type list in Batch Class
global class TestBatch implements
Database.Batchable<sObject>, Database.Stateful {
list<id> useridlist = new list<id>();
global TestBatch(list<id> idforlist){useridlist=idforlist;
}global Database.QueryLocator start(Database.BatchableContext bc) {
return Database.getQueryLocator('SELECT id,name FROM sObject WHERE id IN :useridlist' );
}global void execute(Database.BatchableContext bc, List<sObject> scope){
for(sObject a: scope)
{
a.put( 'name','Algo');
}
update scope;
}global void finish(Database.BatchableContext bc){
}
}
please give suggestions.
Log In to reply.
Popular Salesforce Blogs

Problem Solving | Salesforce Project Implementation
'I am happy to help you', I replied to a post on a Salesforce group. A group member posted a roadblock in his recent Salesforce…

CPQ and CRM: The Best of both Worlds to Empower your Sales Teams
How efficient are your sales processes? While there may not be a definitive answer to this question, it makes us rethink our sales processes and…

How A Salesforce CRM Call Center Can Be Setup And Call Center Users Can Be Managed?
The third party CTI systems can be integrated seamlessly with Salesforce with the help of a Salesforce CRM Call Center. In the Salesforce console footer or…
Popular Salesforce Videos
Mastering the VLookUp Function | Salesforce Tutorial
Watch this amazing video tutorial and follow these steps to effectively use the VLookUp function for data import purposes in your Salesforce database. If you…
Create a New Marker Layer in Maps | Salesforce Maps
Salesforce Maps is a location intelligence and map visualization tool that integrates with your Salesforce CRM, simplifying territory management. With Salesforce Maps you can create territories…
Salesforce Lightning: Custom Theming and Branding
As part of myLightning, Custom Theming and Branding for Lightning Experience lets you customize key styling elements, such as the global header color, brand image,…