Skip to main content
please help me

=======================

global class batchapex1 implements database.batchable<sobject>{

    global list<application__c> app =[select email__c from application__c ]; 

    global database.QueryLocator start(database.BatchableContext bc){

        return database.getQueryLocator('select applicationname,phone__c,monthlysalary__c,email__c');

        

    } 

    global void execute(database.BatchableContext bc,list<application__c> app){

        for(application__c a:app){

            a.pone__c='521545';

            a.phone_no__c='45456';

            a.area__c='madaapur';

            a.value__c=554;

          database.insert(a,false);

            

        }

    }

    global void finish(database.BatchableContext bc){

messaging.SingleEmailMessage ma=new messaging.SingleEmailMessage();

    

            list<string> toaddress =new list<string>{app.email__c};

            ma.settoaddresses(toaddress);

        messaging.Email[] mail = new messaging.Email[]{ma};

            messaging.sendEmail(mail);

        

            

    }

}

the error is that is 

Initial term of field expression must be a concrete SObject: List<Application__c>
3 answers
  1. Mar 14, 2016, 6:25 AM
    who filled application form acording that his application number has to sent him to there mail has to taken from application(obj) field name is email__c its a custom field to the application(obj)
0/9000