Files
smartclone/README.md
T
2021-04-14 21:48:24 -04:00

46 lines
2.4 KiB
Markdown

# Smart Clone - Opportunity Cloner
The purpose of the Smart Clone is to provide the user with the functionality to clone an opportunity, but with added
benefits.
- The ability to select only fields that need to be edited during the cloning
- The ability to select fields that must be cleared of their original value
- The ability to clone other child objects than just Opportunity Products
The Project consists of the following components:
| Item | Description |
| ---- | ----------- |
| OpportunityCloneService | Apex class that contains the Apex functionality |
| OpporutnityCloneserviceTest | Code coverage and unit test class |
| TestCloneUtility | Utilities used in the Code coverage and unit test class |
| SmartCloneChildList custom label | Custom Label used as a setting to store semi-colon separated list of child objects to select from |
| opportunityCustomClone | Lightning web component that is the visual interface |
| OppCustomCloneAura | Aura Lightning Component that is used to wire to a QuickAction |
| Opportunity.SmartClone QuickAction | The QuickAction button to use on the Opportunity Detail Layout |
| Opportunity.ClonedFields fieldset | the fieldet used to configure displayable and cleared fields for input |
### Additional Notes
- This application currently will not support the cloning of a hierarchy of children. This means it is only designed to support
the cloning of direct children to the Opportunity, and the Opportunity itself
## Setup
### Prerequisites
- You need to have the Salesforce CLI installed on your system to follow the install directions.
### Installed Steps
1. Clone this repository to your local filesystem.
2. Navigate to the directory created from the clone.
3. Create a 'build' folder in the directory of this cloned repository
4. Convert the project into deployable Metadata API format using the following command `sfdx force:source:convert -r ./force-app/main/default -d ./build/unpackaged/`
5. Zip the 'unpackaged' directory located in the 'build' folder.
6. Deploy the zip file into your instance using the following command `sfdx force:mdapi:deploy -u <yourinstancealias> -f ./build/unpackaged.zip -w 30 --verbose`
1. Optionally, you can use the `-l RunLocalTests` option if installing into a production instance separately.
7. Once the deployment completes successfully, the components will be installed in your instance.
### Setup Steps