We will cover all that you need to know in order to calculate the Forecast Amount.
You will need the following fields:
- Opportunity Amount, Field Type: Currency
- Win Probability %, Field Type: Percentage
You can use the names that best suit your organization for these fields. You will just need to replace their names in the code snippet below.
If you want to learn how to create Fields, please visit the following tutorial:
Open the menu and go to 'Settings', then click on 'System Settings' to display the available options. There click 'App Setup' and select the desired app. Make sure you are under 'Form Fields'. Then, click on the 'Add Field' button at the top right corner.
Here, you will need to give your field a name and enter a description, which is optional. Then select 'Currency' as the field type and check the 'Calculated' box in order to display the calculation section. Then copy & paste the code below:
var forecast = deal.Amount * deal['Win Probability %'];
If your fields have different names, you would need to replace the bold parts with the right field name. Your field should look similar to the image below. Once you are done, click the Save button.
This calculation will happen when the information on the Amount and the Win Probability fields have information.