-
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
Best Salesforce Implementation Partner and Consulting Company in the USA
Introduction: In today's fast-paced business landscape, staying ahead of the competition requires innovative strategies and cutting-edge technologies. Salesforce, as the world's leading customer relationship management…
Bric Web App - Accessing your card directory online
Bric Web App - Accessing your card directory online It's great to have business cards saved on mobile Apps like Bric App, accessed on the go…
Salesforce Marketing Cloud’s Einstein Just Got Better!
Cometh the update, cometh the improvements! With the recent June ‘21 release, Marketing Cloud has seen a couple of key improvements made within the Einstein…
Popular Salesforce Videos
What is Classic Email Templates and Documents? Salesforce Tutorial
Classic Email Templates are also called Communication Templates. Watch this video and learn all about it, if you have any doubts or concerns, do reach…
Subscribe to Dashboards and Reports (Salesforce Lightning Experience)
By subscribing to a dashboard or report, you can have it refreshed and waiting in your inbox before the weekly sales meeting, or whenever you…
How to Get Experience as a Fresher in Salesforce World? | The Shrey Sharma Show
Want to start your career in the Salesforce industry? Watch this video by Shrey and learn how you can get experience as a Fresher in…