-
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
Simplifying Case Management in Salesforce Service Cloud
Research shows that 68% of consumers are willing to pay more if they know they will receive superior customer service. In fact, customer service is…
Salesforce Territory Management: Overview, Features, Pros and Cons
If being territorial can help your business, why not adopt it? Well, just the way being territorial can help you have a clear vision of…
An Introduction to Salesforce Lightning Bolt Solution
Lightning Bolt Solution An incredible new framework for faster deployment of next-generation communities and portals. Lightning Bolt for Salesforce enables you to quickly build and…
Popular Salesforce Videos
What Is Loyalty Management in Salesforce? | Video Tutorial
In the past few years, we have come across terms such as loyalty programs and loyalty management. Let's understand the concept of loyalty management with…
Salesforce Tutorial - Data Loader Installation On Windows - with Zulu Open JDK
Data Loader is utility to perform bulk database operation. Recently Salesforce has changed the way data loader need to be install. I explain end to…
Ask Me Anything with Salesforce Developers | Lightning Web Components
Join experts Mohith Shrivastava and Greg Whitworth for our monthly feature Ask Me Anything! This 1-hour session on Lightning Web Components is your chance to…