+ Start a Discussion
vasu yadavvasu yadav 

what is the exact difference between future annotation and batch class? which case we would prefer future annotation and which case we would prefer batch class?

Hi, I am new to salesforce and  have some confussion,
what is the exact difference between future annotation and batch class? which case we would prefer future annotation and which case we would prefer batch class?

Thnaks in advance
Best Answer chosen by vasu yadav
Kanika DuaKanika Dua
Hi Vasu

@future method is used when we want to execute a method after some delay.Generally Used in Scenerios while we are working on Setup and Non-setup Objects

Batch Class is Used when we want to process records in Batches to avoid Hitting Governor limits.Like when we want to Update a Field Weekly on all the records we will use batch Class