-
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

An Overview of Salesforce Einstein Analytics
In this top blog on Salesforce, we will be discussing Salesforce Einstein Analytics and what it is, how it works, and more. Salesforce Einstein Analytics…

Latest Trends you may have missed about Salesforce Journey Builder and GA 360
Salesforce Journey Builder — In November 2017, Salesforce announced a strategic partnership with Google that brought together two of the world’s leading tech giants. And with deep…

Salesforce Marketing Cloud Genie — Building Real-time Relationships with Customers
Salesforce Marketing Cloud is a digital platform that combines multiple tools and solutions. It provides everything you need including email marketing and audience development. Salesforce stores data…
Popular Salesforce Videos
Understanding Approval Process in Salesforce | How to create an approval process?
In this video, Shrey discussed Approval Process in Salesforce in detail and also he covers the following topics: 1. What is Approval Process? 2. How…
Create Surveys in Salesforce | Salesforce Tutorial
Learn how to create surveys in Salesforce. In this video, the following points will be covered - 1. Build A Survey Learn how to build…
Salesforce: Everything You Need to Know About Order Management
THE GOAL: Which Salesforce Order Management application is best? Well, that depends…. Salesforce offers three primary applications for order management, and they all work extremely…