-
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
Lightning Web Component | Salesforce Developer Guide
Lightning Web Component Presently you'll construct Lightning components utilizing two programming models: Lightning Web Components and the first demonstrate, Air Components. Lightning web components are…
Is Salesforce a Lucrative Career Path?
Salesforce is "the world's #1 customer relationship management (CRM)," according to the website of the company. Their software is aimed to help organizations expand by…
Introduction to Lightening Web Components | The Ultimate Guide
Lightning Wеb Componеnts (LWC) arе a nеw framеwork for building UI componеnts for Salеsforcе apps. LWCs usе standard wеb languagеs likе HTML, CSS, and JavaScript…
Popular Salesforce Videos
When to Code, Configuration, Code + Configuration in Salesforce
When to Code, Configuration, Code + Configuration in Salesforce by Nikunj Doshi, Salesforce Certified Technical Architect In this session: - Key Criteria in deciding the…
External ID In Salesforce | Salesforce Training
In this video, you will learn how to use External ID in Salesforce, usage, limitations and implementation of External ID in Salesforce. The following points…
AMPscript Case Functions - Salesforce Marketing Cloud Functions in 5 minutes
Cameron Robert steps through how to use the Upper, Lower and Proper Case Functions in AMPscript. Cameron also takes a closer look at the ProperCase…