-
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

What are Sandboxes in Salesforce?
Salesforce sandboxes are copies of your Production environment. A sandbox contains all the configuration, customization, apps and code (known as metadata) that you have made to…

How Does Network-as-a-Service Benefit Your Business | Salesforce
Network-as-a-Service (NaaS) is a framework for delivering network services over the internet. It is also a business model in which a service provider provides network…

Update Records Using Salesforce Flow | Salesforce Developer Guide
Go to Setup, enter flow in Quick Find then select Flows. Click on New Flow. From the template, select Screen Flow. Let's update the Annual…
Popular Salesforce Videos
Marketing Cloud To Become Customer Company
Leverage Marketing Cloud's ability to engage customers by delivering premium personalized experiences and building meaningful relationships with them. Contact Cyntexa to boost your business with…
Famous Brands With Their Applications Listed On Salesforce AppExchange
Selling your app on AppExchange can dramatically increase your business revenue. Various renowned brands have already harnessed the potential of this marketplace to broaden their…
How To Use Salesforce Campaigns in Pardot
Learn campaign basics to help you plan your marketing strategy. In this video, Pardot experts guide you in: - Defining campaigns in Pardot and Salesforce…