function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mahi_maramMahi_maram 

How to write the batch process for account and contact

Hi,

would you please explain about batch process and how to write the batch process for Account and  Contact..one day if i creartre 10 Accoutns that each Account details should be converted as csv or excel file end of the particuler  day. 

sfdcfoxsfdcfox

Please, do not post the same question in multiple categories (this is referred to as cross-posting).

Mahi_maramMahi_maram

Hi sfdcfox,

how can I delete this post.

Thanks. 

Navatar_DbSupNavatar_DbSup

Hi,

 

For the batch process go through the below link:

 

http://salesforcesource.blogspot.com/2010/02/utilizing-power-of-batch-apex-and-async.html

http://www.interactiveties.com/b_batch_apex_invalid_query_locator.php

 

You can use the Custom Reports for Account and  Contact..one day based on the filter and also download in the csv or excel format. You can also schedule the reports. 

 

OR

 

You can also create a custom VF page with the content type=”applicaton/vnd.MS-Excel#Account.csv” with a schedulable class  

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

Mahi_maramMahi_maram

Hi Navatar,

I wrote the apex class but when this class will execute when the email notification will send.

I need create VF or not. Without VF page can we do????

sfdcfoxsfdcfox

See the Schedulable interface in the Apex Code Language Reference. It outlines how to make a class that can be "scheduled" to run on an interval, similar to Windows Task Scheduler or Linux's cron(8). You may want a VF page to make it easy to schedule your class, but the class itself does not depend upon any VF being present in the system for execution.