Extend Your Year Range to 2025 on salesforce.com Calendar : In our previous Salesforce Tutorial we have learned about Creating Account Credit score graphics with Google image charts. In this CRM Salesforce Training Tutorial we are going to learn about How to extend your year range to 2025 on salesforce.com Calendar .
In salesforce.com we have many useful field types from formula fields and Roll-up Summary fields. Year values in salesforce.com are limited we can not select more than that year value from the pick list.
When we click on a date field in salesforce.com, a user is automatically presented with a pop up calendar to select the data ranges. When selecting year range from the calendar we can find only 7 years. 7 years are displayed from present year to next 5 years and one previous years. If we want to choose dates further than five years in to the future we have to improve user experience and enable future years to selected.
Extend Your Year Range to 2025 on salesforce.com Calendar
Follow the steps given below to extend Your Year Range to 2025 on salesforce.com Calendar.
Go to Setup=>Customize=>Home=>Home Page components.
Now select new button.
Select next button and go to step 1 to enter custom components.
- Enter name as Calender year Extender.
- Type as HTML Area.
- Select Next Button.
- Select Narrow (Left) Column from component position section.
- Select Show HTML check box.
- Use the code shown below.
[codesyntax lang=”sql” lines_start=”0″ title=”Calendar Extender”]
<br> <script type="text/javascript"> function insert(pobjSelect, psText, psValue){ var lobjOption = document.createElement("Option"); lobjOption.text = psText; lobjOption.value = psValue; pobjSelect.options.add(lobjOption); } var winLoaded = window.onload; window.onload = function(){ if(winLoaded){ winLoaded(); } var e = document.getElementById("calYearPicker"); if(e != null){ var d = new Date(); var startYear = d.getFullYear() + 6; for(var i=startYear; i < 2026; i++){ insert(e, i, i); } } } </script>
[/codesyntax]
Now Save the settings.
Now go to Setup=>Customize=>Home=>Home page Layouts=>Edit.
Click on Edit button.
Now check Calendar Year Extender check box and Click on Next.
Arrange the order of the component and click on Save button.
Now to salesforce.com calendar ad select the year range up to year 2025.