-
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
Salesforce Releases New Google and LinkedIn Data Cloud Integration
Salesforce has just released new Data Cloud integrations for Google and LinkedIn. Salesforce users can utilize these integrations to merge first-party data from Salesforce's #1…
Discover How Salesforce Commerce Cloud Can Transform Your Business
Salesforce Commerce Cloud is revolutionizing the way businesses interact with their customers. It provides a powerful, cloud-based platform that enables companies to create engaging digital…
Better Data Quality in Salesforce Helps Decision Making
Ensuring the data in your Salesforce environment is accurate and up to date is a challenge for every organisation. To be able to make important…
Popular Salesforce Videos
Getting to Know Einstein Analytics
Einstein Analytics is an app used to visualize the activity occurring in your Salesforce environment. Whether you use Salesforce for Sales, Marketing, or Service, this…
What is the Growth and Future of Salesforce Administrators In India
What is the Growth and Future of Salesforce Administrators In India? Listen to #shreysharma guiding and answering all of your queries.
Who Should Use SFRA and PWA? | Salesforce Commerce Cloud
Different organizations need different architecture according to their needs. Organizations who want their website built on the latest technology and modern approaches can go towards…