Overview
The Contract Closeouts feature on a Contract Vehicle record enables you to create and initiate Closeouts for your Contract using Contract Closeout Tasks and records.
This document is a step-by-step guide on how you can configure the Contract Closeouts feature in Salesforce.
Audience
Salesforce Administrators
IT Support
Prerequisites
Ensure that Contracts Module - TechnoMile Suite Sale Cloud Edition has already been installed and configured. The version of this package must be 7.3 or higher.
Provide Access to Custom Profiles
Enable Apex Class Access
Click the gear icon and select Setup.

Enter text Profiles in the search bar, and click Profiles.

Click a Profile that you want to provide Contract Closeouts access to.
NOTE
In this document, permissions have been provided to ONE Profile. However, you can provide the same permissions to as many Profiles, as per your requirements.

Click Enabled Apex Class Access.

Click Edit.

Select and move the following seven Apex Classes from Available Apex Classes to Enabled Apex Classes using the Add arrow button and click Save.

Give Access to Custom Objects
Click Edit and scroll down to give Custom Object Permissions.

For Custom Object Permissions, ensure that you select the following checkboxes.

Click Save.

Give Access to Custom Fields
Scroll down to Custom Field-Level Security and click View to edit the following Custom Field-Level Security fields.

IMPORTANT
Refer to the following table to give access to fields of Custom Objects.
Object
Access Type
Field(s)
Contract Close Out
Read and Edit
Anticipated Close Out Date, Close Out Initiated, Contract Administrator, Contract Close Out Name, Contract Rate Audit Completed, Contract Vehicle, Contractual Warranty, Date closeout finalized, Date internal stakeholders notified, Document Archived Date, Document Deletion Date, Estimated Closeout Date, Evidence Of Physical Completion, Final Indirect Rates Audit Date, Final Indirect Rates Settlement Date, Final Invoice Accepted?, Final Invoice Accepted Date, Incurred Cost Submitted?, Legal Entity Name For Final Invoice, Required Documents Submitted?, Settlement Of Final Indirect Rates, Status, Warranty Provision End Date, and Warranty Provisions apply?
Contract Closeout Task
Read and Edit
Applicable, Assigned To, Assigned To Formula, Contract Close Out, Description, Due Date, Duration, End Date, Notes, Priority, Role, Start Date, Status, Subject, Task Number, Type, and URL Link
Contract Vehicle
Read and Edit
CCO Count, Contract Closeout Count, and Contract Status
Distribution
Read and Edit
Contract Name Formula, Contract Number Formula, and Contract URL Formula
As an example, we have selected the field(s) required for the Contract Vehicle (Custom Object).
Click Edit to select the fields for defining the Contract Vehicle Field-Level Security and click Save.



Similarly, select the checkboxes of all fields as listed in the table above.
Activate Field Values
Go to Object Manager, enter text Contract Closeout Task in the search bar, and click Contract Closeout Task.

Go to Fields & Relationships, enter text Status in the search bar, and click Status.

Under Inactive Values, click Activate against Value - Not Applicable.
Contract Closeout Task Status field value - Not Applicable is activated.
Similarly, go to Contract Vehicle Object Manager, then go to Fields & Relationships, enter text Contract Status in the search bar, and click Contract Status.

Under Inactive Values, click Activate against Value - Closed.
Contract Vehicle Contract Status field value - Closed is activated. 
Create Field Value
IMPORTANT
Perform the below mentioned steps ONLY if you are an existing Customer who is performing an upgrade to access this feature.
Go back to Contract Closeout Task Object Manager, then go to Fields & Relationships, and click Status.

In Values, click New.

Enter value as Not Applicable and click Save.
Contract Closeout Task Status field value - Not Applicable is created.
Add Closed Value to Record Type
Go to Record Types and click to open any Record Type of your choice.

Click Edit against Contract Status.

Select and move the Value - Closed from Available Values to Selected Values using the Add arrow button and click Save.

Similarly, you can add the Closed value to other Record Types.
Activate Flows
Go to Flows using Setup search.
Click to open Contract Closeout Email.

Click Activate.
Flow is activated.Activate Contract Closeout Validation Rules
Go back to Contract Closeout Object Manager, then go to Validation Rules, and click Edit against Validate_Contract_Closeout.

Select the Active checkbox and click Save.
Validation Rule is activated.Similarly, activate the following Validation Rules:
Validate_Final_Closeout_Change_Terminate
Validate_Final_Closeout_Change_Completed
Avoid_mod_for_closed_contract
Validate_Contract_Closeout_Exist
Configure Custom Settings
Deactivate GRC Trigger
NOTE
Perform the below mentioned steps ONLY if you do not wish to use the Contract Closeout Trigger that is available in this package, by default.
Go to Custom Settings using Setup search.
Click Manage against GRC Trigger.

3. Click New.
4. Enter Name as TM_ContractTaskTrigger, select the Deactivate checkbox, and click Save.

GRC Trigger is deactivated.
Add Closeout Tab to Contract Vehicle
Click App Launcher, enter text Contract Vehicles in the search bar, and click Contract Vehicles in search results.

Click to open a Contract Vehicle record.

Click the gear icon and select Edit Page.

Lightning App Builder opens, go to any tab and click Add Tab.

Click Details and select Custom as Tab Label.
Enter Closeout as Custom Label and click Done.

Add Tab Details
Go to the Closeout tab and drag & drop the TM_ContractVehicleCloseOut component onto this tab.

Click Save.

A popup window opens, click Activate.

Click Assign as Org Default.

Choose Desktop and click Next.

Click Save.
Contract Vehicle Detail page is assigned as Org Default.Go Back.
Contract Vehicle record page opens with the Closeout tab on it.
NOTE
If you are using the Contract Vehicle Page Layout that is set as default from the package, then it is possible that the Closeout tab may also appear by default on your existing page layout and you will not be required to perform the above listed Tab add/configuration steps.
Update Contract Task Template
Go to Contract Vehicle Configure using App Launcher.
Select Contract and Definitive and click Go.

Click Manage Contract Closeout Task Template.
Manage Contract Task Template page opens.Click the Edit icon against a Task Template.

Edit Task Template details and click Confirm.
You can also create a new or delete an existing Task Template by clicking the New button or Delete icon, respectively.
Go to a Contract Vehicle record page with a Closeout Task record in it using App Launcher.
Go to the Closeout tab.
Click the Import button.

Click Upload under Upload Task from existing template.
Success! message displays.
Edited Task Template details as shown in step 5 display.
