Configure custom copy directives
  • 26 Apr 2023
  • 1 Minute to read
  • Dark
    Light

Configure custom copy directives

  • Dark
    Light

Article summary

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

  1. Go to Setup > Custom Metadata Types > Manage Records.
  2. Select Edit to modify an existing record or select New to create a record.

Configure a Lightning Wrapper component

Note

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.

  1. Go to Developer Console > File > New > Lightning Component.

  2. In the New Lightning bundle dialog, specify a unique name for the Lightning Wrapper component, then select Submit.

  3. 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>
    
  4. 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.

  5. Save the component.

Create a new Quick Action

  1. Go to Object Manager, then go to Contract (or Deal or Price Lookup) > Buttons, Links and Actions, and select New Action.
  2. From the Action Type dropdown, choose Lightning Component.
  3. From the Lightning Component dropdown, choose the name of the component you created.
  4. In the Label and Name fields, specify a custom name for the new action button.
  5. Select Save.

Drop the new action on the object layout

  1. Go to Page Layouts for this object and select a layout.
  2. In the Mobile & Lightning Actions section, find the new action button.
  3. Drag it to the correct place in the layout.
  4. Select Save.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.