-
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
NorCal Dreamin’ 2019 Wraps Up! What Did Algoworks Witness?
A Salesforce community event led by the Salesforce community, NorCal Dreamin’ 2019 was a huge success! We had a blast while interacting with the amazing…
Introducing Trailhead ForceLeaderBoard API
Great power comes with great responsibility!!! Now its time to take your trailhead and certificate data to your platform. Just a simple API call and…
Important Strategies Lessons from Dreamforce 2024
Are you ready to discover how Salesforce's latest innovations at Dreamforce 2024 are reshaping the future of business? From cutting-edge AI integrations and the power…
Popular Salesforce Videos
Salesforce Apps: Managed vs. UnManaged Package Importance from Lederhosen Salesforce
Salesforce has Two Types of Packages ( Tabs, Objects, Software ) you can load: Managed & UnManaged. This video describes both. The advantage of a…
Use Aura Component in Screen Flow | Salesforce Flow Builder Tutorial
Hello Trailblazers, In this video, we will learn how to use Aura Component in Salesforce Screen Flow. How to validate the Lightning Component Input from…
Salesforce Lightning Design System (SLDS) and Components
The Salesforce Lightning Design System (SLDS) helps you build applications with the look and feel of Lightning Experience without writing a single line of CSS.…