-
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
Is Your Salesforce Org Ready for Lightning Experience?
Almost a year ago Salesforce launched the biggest innovation, named Lightning. Lightning gave a completely new platform and user experience, and even day by day…
What Makes Teqfocus Your Perfect Salesforce Partner
When you ask yourself the question of which Salesforce company is the best in India and which company should you consider as the perfect Salesforce…
No Code Salesforce and Outlook Integration
Microsoft Outlook is a personally identifiable information management software system included in the Microsoft Office suite. Outlook is essentially an email client, and also contains…
Popular Salesforce Videos
Salesforce - The Ultimate Career Booster | Salesforce Tutorials For Beginners
This Salesforce Training Webinar will help you understand how Salesforce is the ultimate career booster for IT, Sales and Marketing. You will learn the Roadmap…
AI Cloud: Explore the GPTs of Salesforce
Discover how GPTs, or Generative Pre-trained Transformers, are revolutionizing the way we interact with AI. We break down the complex jargon and show you how…
MuleSoft Integration: Salesforce Event with AWS MySQL Database
Learn how to integrate Salesforce Event with AWS MySQL Database using MuleSoft. The video will cover these four points - 1. Introduction Integrating Salesforce and…