You need to sign in to do that
Don't have an account?

Update a field value using apex class
how to update a boolean field value for last record at the time of inserting large number of records?
Am inserting large number of records in one object using apex class at that time ,i want to ensure a boolean field value as true for last record.
Thanks
Venkatsforce
I don't understand your search condition, please give me a detailed description with your problem. I will sent a solve scenario to you. Thanks.
Sample code as below,(this updates the booleanfield__c as true for last record in accList[Account List])
Integre count = 0;
for(account acc: accList){
count++;
if(count == accList.size())
acc.BooleanField__c = true;
}