To solve the preceding business requirement, we will use Process Builder. In the run time process will responsible to auto create a contract record whenever a new account record gets created. To do this, follow these instructions:
-
In the Lightning Experience, click on Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Process Builder in Lighting Experience, click on the New button, and enter the following details:
-
Process Name: Enter the name for the process. Enter Auto create new Contract as Process Name. This must be within 255 characters.
-
API Name: This will be auto-populated based on the name. This must be within 77 characters.
-
Description: Write some meaningful text so that other developers or administrators can easily understand why this process has been created.
-
This process starts when: It allows you to select when you want to start your process. The followings are the options:
-
A record changes: Select this option if you want to start your process when a record is created or edited.
-
It's invoked by another process: Select this option if you want to invoke your process from another process. It allows you to create an invocable process by selecting this option. An invocable process is a process that starts when another process invokes it. In Chapter 6, Building Efficient and Performance Optimized Processes we will discuss in detail with a few use cases.
-
-
In this case, select A record changes. The fields should appear as shown in the following screenshot:
-
Click on the Save button once you are done. It will redirect you to the process canvas, which allows you to create the process by clicking, not code.