-
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
Chrome Blocking Mixed Content in Salesforce - All You Need To Know
Substance over HTTPS is getting to be a more grounded browser necessity. Google Chrome is presenting an arrangement of notices and will start blocking blended…
Adding error messages to field inputs
When users are editing or creating a record via a Visualforce page, they will often make mistakes or enter invalid data. The required fields will present…
Popular Salesforce Videos
Salesforce Training | Salesforce Jobs For Beginners Video
Salesforce Training Tutorial video provides What is Salesforce and Salesforce jobs and Salesforce careers for beginners. So if you are planning to becoeme a Salesforce…
How to Create Bulk Custom Fields in Salesforce using BOFC App | Salesforce | BOFC | AppExchange
Want to perform multiple operations? This quick video walks you through how to create mass custom fields of any type (Master Detail, Lookup, Formula, Primitive…
Salesforce Essentials
Watch this video to learn what customer relationship management (CRM) is and how CRM helps companies better engage with prospects and customers, streamline communications, and…