You need to sign in to do that
Don't have an account?
kirankumarreddy punuru
Can someone tell me the meaning of this two lines
if(tasksToUpdate.size() > 0 && calledFrom == 'batch')
database.update(tasksToUpdate);
tasksToupdate is the list and remaining part i did not understood help me
database.update(tasksToUpdate);
tasksToupdate is the list and remaining part i did not understood help me
if(tasksToUpdate.size() > 0 && calledFrom == 'batch')
If ! and 2 are true than all contition will be true and then next statment will be execute.
database.update(tasksToUpdate);
Database is system class define by Salesforce and Update is function which take the list of record and update the record which are in present in "tasksToUpdate" list.
-Thanks
Ashlekh Gera
I am having one doubt that is how to cover test coverage for :
catch(DmlException ex){
ApexPages.addMessages(ex);
return null;
However, here's a good example if you want to cover these lines too.
http://salesforce.stackexchange.com/questions/57344/how-to-cover-catch-statement-in-test-class