Resolving Duplicate Value Found on Surface v2.4.1 upgrade
When upgrading Surface to version 2.4.1+, the Contract record of SAP Doc Flow Type Config must be manually deleted first.
- Navigate to the Custom Metadata Types section of Setup

- Click Manage Records next to SAP Doc Flow Type Config

- Delete the Contract record

- Proceed with upgrading Surface to version 2.4.1
