How to do it...

Carry out the following steps to create a formula field to derive year and month values from the opportunity close date for opportunity records:

  1. Click on the Setup gear icon in the top right-hand corner of the main Home page, as shown in the following screenshot:
  1. Click on Setup, as shown in the following screenshot:
  1. Navigate to the Opportunity customization setup page as follows:
    Objects and Fields | Object Manager | Opportunity | Fields & Relationships.

Locate the Fields & Relationships section on the right of the page.

  1. Click on New.

We will be presented with the Step 1. Choose the field type page.

  1. Select the Formula option.
  2. Click on Next.

We will be presented with the Step 2. Choose output type page.

  1. Enter CloseDate YEAR MONTH in the Field Label textbox.
  2. Click on the Field Name. When clicking out of the Field Label textbox the Field Name is automatically filled with the value Close_Date_Year_Month.
  3. Set the Formula Return Type as Text.
  4. Click on Next.

We will be presented with the Step 3. Enter formula page.

  1. Paste or enter the following code in the formula editor box:
TEXT(YEAR(CloseDate)) & " " &
CASE(
MONTH(CloseDate),
1, "January",
2, "February",
3, "March",
4, "April",
5, "May",
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December",
"Error!")

The formula field is to be set according to the following screenshot:

Optionally, enter details in the Description field.

  1. Optionally, enter details in the Help Text field.
  2. In the Blank Field Handling section, select the option Treat blank fields as blanks.
  3. Click on Next.

We will be presented with the Step 4. Establish field-level security page.

  1. Select the profiles to which you want to grant read access to this field via field-level security. The field will be hidden from all profiles if you do not add it to field-level security.
  2. Click on Next.

We will be presented with the Step 5. Add to page layouts page.

  1. Select the page layouts that should include this field. The field will be added as the last field in the first two column section of these page layouts. The field will not appear on any pages if you do not select a layout.
  2. Finally, click on Save.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset