-
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
Salesforce for Healthcare: Hospitals digitalization with Salesforce CRM
Customer Relationship Management (CRM) in healthcare is highly beneficial as for a hospital chain or a mini-private clinic that provides independent medical practice. Cloud-based healthcare…
Get your development faster with Apex Code Assistance, Lightning Previewer and PMD Support for Apex in a new release of The Welkin Suite IDE
The Welkin Suite team just finished up its large push to hand out its latest Release for Windows, “Bloom R1”, as they continue toward their…
How to Become a Salesforce Developer? Here are the Tips to Consider
The certification and qualification of a Salesforce developer is a lengthy, rigorous task, but an incredibly fruitful one, nonetheless. It is one of the fastest…
Popular Salesforce Videos
Salesforce Mobile Publisher Demo
With Salesforce Mobile Publisher, you can create pixel-perfect mobile applications for employees, customers, and partners. Check out this video and learn all you need to…
Salesforce Standard vs Custom Objects Explained
Salesforce, a leading customer relationship management (CRM) platform, offers both custom and standard objects to organize and manage data effectively. Standard objects are pre-built components…
Marketing Cloud | Salesforce Send Email
There are two ways to send an email in Marketing Cloud; Guided Send Wizard & Salesforce Send Email. The benefit of the Salesforce Send Email…