-
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
Choosing the Right Salesforce Support Partner in India
Selecting the right Salesforce support partner is crucial for unlocking the full potential of your Salesforce investment, especially in a vibrant and competitive market like…
Salesforce Summer'24 Highlights | All You Need to Know
Salesforce’s Summer ‘24 update is here, and its features are like a breath of fresh air. Let’s go over some of the cool features that…
Popular Salesforce Videos
Salesforce Business Analyst Training
In the 35th Episode of the #AskTheHulk series, Savitha Asked about how to switch to IT from Non-IT background. To this question, Shrey suggested that…
How to Log an Admin Assist Support Case in Help and Training in Salesforce Help
Do you need to log a case with Admin Assist Salesforce Support but aren't sure how to go about it? Do you need help filling…
Sculptor CPQ for Salesforce
Sculptor CPQ (Configure-Price-Quote) for Salesforce CRM-based businesses allows to reduce the length of the sales cycle and generate quotes 2X faster. Smart and intuitive product…