-
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
Step by Step Procedure to Implement reCAPTCHA with Visualforce Page
Introduction Salesforce web apps are developed and used from a long time through Visualforce platform. These apps can provide better functionality and performance, but at…
A Primer to Salesforce Einstein
Salesforce Einstein is not just the cool, new artificial intelligence analytical system from Salesforce. Salesforce Einstein is the cool, new and effective artificial intelligence from…
Understanding Salesforce Permissions
Permissions in Salesforce can be dizzying. Between licenses, profiles, and permission sets, there are multiple ways permissions can be assigned, and multiple considerations you should…
Popular Salesforce Videos
Salesforce For Beginners - Introduction To Salesforce | Salesforce CRM Developement Tutorials
Contents for this Salesforce Training Video: 1:05 - Index 1:31 - What is CRM ? (Customer Relationship Management) 2:17 - What is Salesforce CRM? 3:18…
3 Must-Have Validation Rules in Salesforce to Save Time and Avoid Costly Mistakes
Validation rules in Salesforce act like quality checks for your data. They help make sure that the data in your Salesforce org is accurate and…
15 Things You Didn’t Know About Salesforce
In this video we'll try to answer the following questions: What is Salesforce and why it is used? What is the job of Salesforce developer?…