You can now leverage the power of the Resource Hero matrix on any custom numeric field. This will allow you to create other types of matrices that would be helpful to your business. Some examples include:
- A budget matrix that tracks dollars over time
- An FTE (full time effort) matrix that forecasts by percentage
- A component matrix that tracks the number of widgets you will install
If the following example, we will create a matrix to help us track the original budget of a project.
Create required fields
Create the numeric field on the Resource Forecast object
- Field should be of type Number
- Field length is 5 with two decimal places
- Default value: 0
Create the notes field on the Resource Forecast object
- Field should be of type Text Area (Long)
- Length is 500
Create a custom setting entry
- From Setup, enter Custom Setting in the Quick Find search box
- Click Manage next to the RHA Matrix Enabled Fields custom setting
- Click the New button
Name: a short name that will be used to reference these settings
Field Name: this is the API name of the numeric field that you created in the previous step
Save Button Text: this is the text that will display on the Save button in the matrix
Dropdown Text: this is the text that will display in the Resource Hero Dashboard under the Field drop down
Notes Field Name: this is the API name of the text area field that you created above
Create the visualforce page
- From Setup, enter Visualforce Pages in the quick find search box, then click on the Visualforce Pages link when it is displayed
- Click the New Button
- Enter in a Label for the new page, for example, Opportunity Budget
- By default, Salesforce will automatically enter the same name in the Name field. Edit the default to remove all spaces. For example: OpportunityBudget
- In the main Visualforce Markup section, we will follow the same format that is used when we Setup Resource Hero on a custom or standard object. NOTE: The key difference is that the ActualOrForecast entry uses the custom setting name that we created in the previous step:
Copy to Clipboard
<apex:page standardcontroller="Opportunity" id="ResourceHeroPage">
Add the new visualforce page to your object’s layout
- From Setup, enter the word Object in the quick find search box, then click on the Objects link on the left.
- Click on the Label of the desired Custom Object
- Under the Page Layout section, click edit next to page layout that you wish to add Resource Hero to
- Create a new single column page section with Resource Hero as the title.
- On the top page layout edit hover, select Visualforce Pages from the left, then drag your visualforce page to the section that you just created.
- Click the edit icon on the visualforce page and change the height setting to 500px. Click OK.
- Make any other desired change, then click Save.