0

Here is my complete code sample

global class b1 implements Database.Batchable<sObject> {

 global final string query;
 global final string s_object;
 global final string field;
 global final string field_value;

 global b1 (string q, string s, string f, string v){
       Query =q;
       s_object=s;
       field = f;
      field_value =v;
   }

  global Database.QueryLocator start (Database.BatchableContext BC){
  return Database.getQueryLocator (query);
  }

  global void excute(Database.BatchableContext BC, List<sObject> batch) {
  for(s_object o= batch){
  o.put(field,field_valu);

  }
  update batch;
  }
    global void finish(Database.BatchableContext BC){

  }
}

1 Answer 1

0

Change this part of code

global void excute(Database.BatchableContext BC, List<sObject> batch) {
  for(s_object o: batch)  // use colon here
  { 
     o.put(field,field_valu);

  }
    update batch;
  }

Your error will be solved.

3
  • yaa its solved thank uuu sharma Jun 9, 2016 at 9:47
  • @seenuChinnavangali if your problem solved then you can accept this answer and close this question. Jun 9, 2016 at 9:56
  • 1.5 year old answer down voted without any comments. At least tell me the reason. Feb 18, 2018 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .