+ Start a Discussion
PS81PS81 

Visualforce Page: How to get calendar like table(s) with input cells?

Hi

My requirement is quite stranges from the user's end. While assigning a product line to opportunity we calculate the number of project days and assign the availability across 12 custom fields representing the twelve months. But if a product's end date is beyond two years we need to have a facility for the user to enter the allocation for 12 months across each year in 2016, 2017 etc which seems quite dynamic as we move to next financial year. 

How can i accomodate such a requirement?

My thoughts was to have a push button enabled for each prouct line (in a new vf page) when the end date is beyond 365 days so that on the click of the button a new page will be displayed with table like strucutre for number of years depending on the end date of the product i.e. 2 tables  with 12 cells each for 2016 , 2017 etc....If this sounds programable I'm quite confused on how i can store this data in sobject? Unless until the product entry i donot know the number of years for the product, in such case how to go with it?

any suggestion on this please?
Andy BoettcherAndy Boettcher
You will want to look at some sort of child sObject to store those variable year calculations rather than a bunch of fields on a single sObject.

If you go this route - your solution is just as simple as spinning up a record per month for the year - no limits!