-
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
Why Integrate SAP with Salesforce in 2024?
While SAP-Salesforce integration can improve operations and data flows, it can also present challenges such as data silos and duplicate data entry. This guide, written…
Send Rich Text Emails Using Salesforce Flow
You may now send rich text emails via Salesforce Flows, which was introduced in the Spring '21 release. Previously, when sending an email using Flow's…
LWC Interview Question – Part 2
Certainly! Here's a mix of Lightning Web Component (LWC) interview questions suitable for both freshers and experienced developers: What are the different types of data…
Popular Salesforce Videos
How To Become A Salesforce Admin?
Wondering how t become a Salesforce Admin. Watch out for this tutorial video, it will answer all your questions. Join this useful group for Salesforce…
Salesforce Training Videos For Beginners - 3 | Salesforce Admin Training
This Salesforce Training Video will help us in quotation generation and improve customer communication. Generating proposals can be a drag on sales team productivity. Editing…
How to get a job in Salesforce industry or ecosystem? (For freshers) | 7 Step Guide
The most common question that is asked: How do I get a job? I have learned Salesforce and I know how to create applications on…