+ Start a Discussion
nani@rnani@r 

how to discount fees in batchapex ?

in this program i discount 50% of fee but i can't get it in data model .

 

 

global class batchapexprocessing implements Database.batchable<sobject>
{

global Database.querylocator<course__c>start(Database.batchablecontext bc){
string query='select name,faculty__c,faculty_name__c,fee__c,femail__c from course__c';
return database.getquerylocator(query);
}
global void execute(database.batchablecontext bc,list<course__c>clist){
for(course__c f:clist){
f.fee__c*=0.50;
}
update clist;
}
global void finish(database.batchablecontext bc){
}
}

HariDineshHariDinesh

Hi,

 

Here "i can't get in data model" means..

Was it not discounting when you call this Batch Class? Means not working as Expected?