-
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
Lead Assignment to the User in a Round Robin fashion | Salesforce Tutorial
Balance your team's workload by automatically assigning new leads to each user. A round-robin assignment means that all new leads will be assigned the same…
What are Flows In Salesforce in 2023?
A flow is a Salesforce application that collects data and performs actions in your Salesforce org or an external system. To automate a business process…
What are Monitoring and Auditing Tools in Salesforce? | All You Need to Know
In this post, we will learn about the Monitoring and Auditing Tools Present in Salesforce. One key aspect of effective Salesforce management is the ability…
Popular Salesforce Videos
Developing an Automated Salesforce Data Quality Process
Learn how to create a harmonious and automated Salesforce data quality process with easy to customize tools and best practices. Beginning with the identification of…
Leads & Opportunities for Lightning Experience - Create and Convert Leads
Learning Objectives After completing this unit, you’ll be able to: Update a record’s stage or status using Path. Update records in the Kanban view. Use…
Create a Multi-page App Using LWC OSS | Salesforce Lightning
The default LWC OSS project created using the create-lwc-app tool lets you create a single-page application. But did you know that by slightly modifying the…