-
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
How to Create Relationship between fields in Salesforce using Look up and Master Detail
In database we link one table with another table using join statements,Primary Key and Foreign Key so that we can access data of one table…
Lightning Data Service (LDS) in Salesforce
If we have a lightning application that Creates, Reads, Updates or Deletes a record (basically CRUD operations) in the Salesforce database, Lightning Data Service (LDS)…
Salesforce Consulting Services: What Does a Salesforce Administrator Do?
It is evident from the fact that any given technology can bring laurels to a company. Not only this, but it can also brighten job…
Popular Salesforce Videos
MuleSoft Integration: Salesforce Event with AWS MySQL Database
Learn how to integrate Salesforce Event with AWS MySQL Database using MuleSoft. The video will cover these four points - 1. Introduction Integrating Salesforce and…
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,…
4 Tips on How to Build Product Messaging & Positioning That Stands Out | Salesforce on Salesforce
Messaging and positioning work together and should be the North Star for any product launch. If done well, it will set you apart from the…