- 26 Apr 2023
- 1 Minute to read
- Print
- DarkLight
Configure custom copy directives
- Updated on 26 Apr 2023
- 1 Minute to read
- Print
- DarkLight
Deal Manager has a single copy control. Use this control to copy an agreement or quote and all associated child records. You can relabel this control to reflect a particular use case.
Some implementations require multiple types of the copy action, such as a Renew action and a Copy action (to use the current Agreement with a different account). Because of their different purpose, each of these copy actions requires its own, custom copy directive.
Create a copy directive
- Go to Setup > Custom Metadata Types > Manage Records.
- Select Edit to modify an existing record or select New to create a record.
Configure a Lightning Wrapper component
If there is already a wrapper component that uses the same value for the copyDirectiveLabel attribute that you need, skip this step and reuse that wrapper component.
Go to Developer Console > File > New > Lightning Component.
In the New Lightning bundle dialog, specify a unique name for the Lightning Wrapper component, then select Submit.
Replace the .cmp markup file with the following:
<aura:component access="global" implements="force:lightningQuickActionWithoutHeader,force:hasRecordId"> <zpl:DeepCopyModal copyDirectiveLabel="ContractCopyWrapper" recordId="{!v.recordId}"/> </aura:component>
Replace the value for the copyDirectiveLabel attribute with the label of the copy directive you want to use. In the preceding example, the label is
ContractCopyWrapper
.Save the component.
Create a new Quick Action
- Go to Object Manager, then go to Contract (or Deal or Price Lookup) > Buttons, Links and Actions, and select New Action.
- From the Action Type dropdown, choose Lightning Component.
- From the Lightning Component dropdown, choose the name of the component you created.
- In the Label and Name fields, specify a custom name for the new action button.
- Select Save.
Drop the new action on the object layout
- Go to Page Layouts for this object and select a layout.
- In the Mobile & Lightning Actions section, find the new action button.
- Drag it to the correct place in the layout.
- Select Save.