I have to replicate Report layout using Visualforce and add Time Frame picklists (Fiscal Year, Fiscal Quarter, Calendar Year, Calendar Quarter etc.) based on today's date.
Is it possible to query default Time Frame values which appear in Report layout? Or even write a query to return From and To Date values by passing Time Frame literal? If yes, then how?
- How to get a list of all standard ranges like "Previous FY"?
- How to get relative Date values based on a selected range and today's date?
The first thing that comes out is to hardcode the range values and develop Apex method for each range to calculate the relative date values "From" and "To". I am trying to find easier way to do this.