-
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

Why Get Your Business Started with Salesforce Sustainability Cloud?
Salesforce Sustainability Cloud is a powerful platform designed to help companies track, analyze, and report on their sustainability performance. The tool provides a comprehensive set…

Salesforce Automation Tools Overview
A Salesforce Implementation can help migrate all your customer, sales and interactions data into one place and standardize business processes. This allows all sales staff…

Salesforce Lightning Web Components: The new way of creating robust components for modern browsers
Salesforce has been on a great journey with the Lightning modules. In 2014, Salesforce had launched the Lightning component framework that was supported by the…
Popular Salesforce Videos
What can Salesforce Service Cloud do for your Businesses
Salesforce Service Cloud allows you to Streamline Workflow, Automate Service Processes, and Surface Key Topics, Articles, and Experts to transform the agent experience. It simplifies…
How to Create a Data Set in Salesforce Maps Territory Planning
Watch this video to learn how to create a data set in Salesforce Maps Territory Planning to plan efficient territories with a few clicks. Please…
Drive Personalized and Scalable Idea Management in Salesforce Community Cloud with IdeasPro
IdeasPro enables you to implement the best of business ideas from your Salesforce community. Foster innovation, improve brand transparency, and make the most of internal…