-
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
10 Ways to Enhance Your Buyer Experience with Quote-to-Cash Solutions | Salesforce Guide
When you have hundreds or thousands of leads to respond to in a single day, errors happen and you get overwhelmed. Right from sending the…
Get More Efficiency with Custom Salesforce App Development
Salesforce is huge. Since it offers a Platform-as-a-Service (PaaS) solution to more than 150,000 businesses globally, including Spotify, AWS, Toyota, and the U.S. Bank, it would…
Top 7 Salesforce Extensions: Blessing In Disguise For Small Businesses
Salesforce, a popular customer relationship management platform, has progressed into being one of the most personalized sales management platforms in the CRM market. Countless Salesforce…
Popular Salesforce Videos
Lightning Roadmap for Salesforce Developers: Components, Services and Tools
Whether you're a Visualforce developer just learning about Salesforce Lightning or a JavaScript guru who eats new UI frameworks for lunch, this session is for you!
Exploring Technology Choices For Salesforce Integration
Are you struggling to find the perfect technology to integrate Salesforce into your business processes? Integrating Salesforce into your business processes can offer significant advantages,…
Salesforce CEO Marc Benioff on New Software to Help Businesses Reopen
Marc Benioff, founder, chairman and CEO of Salesforce, joins CNBC's Jim Cramer to discuss the company's new initiatives to help businesses reopen. Salesforce announced a…