目次
When creating a business meeting in Salesforce, the “CloseDate” is a required field and must be entered each time. However, entering the “Expected Completion Date” can be quite troublesome for some companies. For example, if there are no situations in which the expected completion date is used, or if business negotiations continue for several years, the expected completion date may be difficult to use, and the user may forget to enter it when registering, causing an error to occur every time.
Such errors only cause stress to the user, so if possible, it is desirable to be able to automatically enter the expected completion date. However, Salesforce does not have such a function by default. Therefore, in this article, we will show you how to set the scheduled completion date to be automatically set to today’s date one year from now when creating a business meeting.
When you click on the “Negotiations” tab, the list of negotiations is displayed. Normally, you would click the “New” button to create a new negotiation, but this button does not allow you to automatically enter the expected completion date. Therefore, it is necessary to create a new “New (automatic completion date input)” button.
First, click on the business meeting tab, then click on the gear symbol in the upper right corner, and then click on “Edit Object. Next, click on “Buttons, Links, and Actions” from the menu displayed on the left side. Then click on the “New Button or Link” button that appears in the upper right corner of the screen.
Then enter the following

The list button is selected because it is the button to be displayed on the business meeting list page. And the formula below is the formula to enter the date added 365 days to today’s date for the expected completion date of the business meeting (CloseDate).
/lightning/o/Opportunity/new?defaultFieldValues=CloseDate={!TEXT(TODAY() 365)}
After verifying the syntax, click “Save”.
Displaying Custom Buttons in the List View
Finally, display the custom button created above on the screen of the list view of the business meeting. Also, hide the default “New” button as it is not needed. (You can leave it visible, though.)
First, click on “Edit Object” from the gear symbol and click on “List View Button Layout” from the menu on the left side. Then click the down arrow (▼) on the right end of the list view and click “Edit”.
Make the following settings

Uncheck “New [New]” under “Standard Buttons” to hide the “New” button from the business meeting list view.
Next, in the “Custom Buttons” section, move the “New (Auto Fill in Expected Completion Date)” under “Available Buttons” to “Selected Buttons”. Click “Save” to complete.
Refresh the list view screen of the negotiation. The button will appear as shown below.

Let’s actually click the button. The expected completion date is automatically entered as shown below.

Other items can be automatically entered in this manner.
If you have read this far, you may have noticed something. This time, we have explained how to automatically input the estimated completion date, but it is also possible to automatically set phases in the same way. For your reference, the following is a formula for automatically setting not only the scheduled completion date but also the phase.
Formula for automatically entering the expected completion date and phase
/lightning/o/Opportunity/new?defaultFieldValues=CloseDate={!TEXT(TODAY() 365)}, StageName=Prospecting
Just enter the item API reference name after the comma and the phase name after the =.
It is possible to have other items auto-filled like this.
This is only available in the negotiation list view.
However, there is one point to note. This button can only be used for automatic input when the button is clicked in the negotiation list view. For example, you can create a new business meeting from the related list of business partners, but the default button displayed there is the “New” button. Please note that the expected completion date is not automatically entered.
