You are here:
Create Custom Source Field for Contract Object
If you want to create a contract from a custom or standard object other than opportunity, quote, or order, you must create a custom Lookup Relationship field in the Contract object. The application automatically maps the custom field from the contract to your custom or standard object so that you can identify the source object for a contract.
The Lookup Relationship field creates a relationship between two records so that it’s gets automatically associated with each other.
- Go to Setup, then click Object Manager.
- In the Quick Find box, search for Contract.
- Click <Contract> and then Field & Relationships.
- Click New.
- Select Lookup Relationship for the Data Type. Click Next.
- Select the standard or custom object to which you want to relate the contract object and then click Next.For example, Asset.
- Enter these details:
- Field Label: Source <name of the custom or standard object>.For example Source Asset.
- Field Name: Source <name of the custom or standard object>.For example SourceAsset.
- Field Label: Source <name of the custom or standard object>.
- Click Next.
- In the Field-Level Security for Profile, select the Visible checkbox for the profiles that must see the custom field. Click Next.The custom field is hidden from all profiles if you don’t add it to field-level security.
- Save your changes.
- In the Field & Relationships tab, search for the custom field and make a note of the Field Name (API name).For example, SourceAsset__c.
- Naming Conventions for Custom Source Fields in Contract
Follow a naming convention based on these scenarios when you create a custom source field on the Contract object. Salesforce prohibits the use of more than one __ in the Field Name (API label) for custom fields.

