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
ipsita19861.2880751705180098E1ipsita19861.2880751705180098E1 

autocreation of records datewise

Hi,

how to create a empy record automatically as the date changes daily.

i want to make an empty records added on to my object for which data can be saved from visualforce page datewise.

 

Thanx

Pradeep_NavatarPradeep_Navatar

Use Apex Scheduler to schedule a controller to execute it at certain given time in future.

 

For this make an Apex Scheduler Controller and to schedule this controller go to...

 

            Administration Setup->Monitoring->Scheduled Jobs from there we select that Controller class

            and then provide some time and date to execute it in future so there you check the checkboxs

            of all the days.

 

            Below is the sample code of the Apex Scheduler Controller to send email-

 

            global class ApexScheduledClass Implements Schedulable

            {

                        global void execute(SchedulableContext sc)

                        {

                                    createRec();

                        }

 

                        public void createRec()

                        {

                                    // here write your code to create the record in that object datewise...

                        }

            }