+ Start a Discussion
Salesforce2015Salesforce2015 

Existing Apex code change

Hi Experts,
 
As of now we are using timesheets for Weekly (Sun- Sat) basis.
Some of our consultants want to submit monthly timesheet. Please anyone advise the code for monthly.
Note: If anyone wants my monthly timesheet apex code I will mail you.
Please find below is the weekly timesheet.
 
Weekly TimeCard
 
Thanks,
Manu
Alok Khandelwal - DamcoAlok Khandelwal - Damco
Hi,

If it is just for some and others would continue to use Weekly timesheets, here is what you could do:

Repeat UI code of the weekly timesheet to cover 4 weeks in a month. This section needs to be displayed conditionally.
Add a check on the page to take user input - Monthly/Weekly
If monthly then display all 4 weekly tables.
Let user fill in 4 weekly timesheets and then save 4 timesheet records to the backend the way you were doing for 1.

On page load also get the data of existing timesheets based on the user input (monthly/weekly).

I hope it was helpful.

Regards,
Alok
Salesforce2015Salesforce2015
Hi Alok,

Thanks for quick response.
Please provide me your communication mail. I'll drop my VF and Class code for better understanding.
My mail: manoharsfdc401@gmail.com

Thanks,
Manu