Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

download

Configuring Preview & Submit Approvals and My Approvals Buttons for Setting Approvals on an Object

Prerequisites

Before configuring new buttons on your context object, create a record with the API name of the context object in the Approvals Custom Config available at Setup > Develop > Custom Settings.

For example, to configure Approvals on an agreement object and its child objects, create a record for each object in the Approvals Custom Config and perform the following steps. To configure Approvals for agreement and agreement clause objects, create two records with the API names Apttus__APTS_Agreement__c and Apttus__Agreement_Clause__c, respectively. For more, see Configuring Global Settings for Agreements and Related Objects.

To enable Approvals for your context object, configure the following buttons and place them on your object record’s page layout.
  • Preview & Submit Approval: For actions such as Preview, Submit, and Recall for Submitter.
  • My Approvals: For actions such as Approve, Reject, Add Ad Hoc Approver, and Reassign.

You can follow any of the following procedures to configure Preview & Submit Approvals or My Approvals button for your context object:

Creating a custom button for your context object

  1. Go to Setup > Create > Objects and search for your object.
  2. In the Buttons, Links, and Actions section, click New Button or Link.
  3. In the Label field, enter either Preview & Submit Approvals or My Approvals.
  4. In the Display Type, select Detail Page Button.
  5. In the Behavior drop-down list, select Display in existing window without sidebar or header.
  6. In the Content Source drop-down list, select URL.
  7. Enter the following formula in the Advanced Formula section:
    • For Preview & Submit Approvals: /apex/Apttus_Approval__PreviewSubmitApprovals?id={!context-object-api-name.Id}
    • For My Approvals: /apex/Apttus_Approval__MyApprovals?id={!context-object-api-name.Id

  8. Replace context-object-api-name with the API name of your object. For example, if working with an Agreement object, use Apttus__APTS_Agreement__c as the context-object-api-name.
  9. Click Save.
  10. Go to a record of your object and click the Edit Layout link.
  11. From the Buttons list, drag and drop the newly created button on your page layout and click Save.

Creating a custom formula field for your context object

  1. Go to Setup > Create > Objects and search for your object. In our example, select the Agreement object of the Contract Management package.
  2. In the Custom Fields & Relationships section, click New.
  3. Select Formula as the field type and click Next.
  4. In the Field Label, enter either Preview & Submit Approvals or My Approvals, for Formula Return Type select Text, and click Next.
  5. In the Advanced Formula text box, enter the appropriate formula based on the button type:
    For "Preview & Submit Approvals" button:IF(AND(NOT(ISPICKVAL(Approval_Status__c,"Pending Approval")), NOT(ISPICKVAL(Approval_Status__c,"Approved"))), HYPERLINK("/apex/Apttus_Approval__PreviewSubmitApprovals?Id="&Id, IMAGE("/resource/[button-image]", "Preview & Submit Approvals"),"_self"),NULL)For "My Approvals" button:IF(OR(ISPICKVAL(Approval_Status__c, "Pending Approval"), ISPICKVAL(Approval_Status__c, "Approved")), HYPERLINK("/apex/Apttus_Approval__MyApprovals?Id=" & Id, IMAGE("/resource/[button-image]", "My Approvals"), "_self"),NULL)
  6. Enter the API name of the field you use for your context object's approval status, which you defined before configuring this button. Along with the required ID parameter, you can also append the following optional parameters to capture more details by a button click. The following parameters are applicable only for CPQ approvals:

    Parameter name

    Datatype

    Use of the parameter

    ctxChildSObjectId

    ID of the child context object

    To view subset of approvals required for the specified child context object.

    returnId

    ID of the object

    To return to detail view of the object referred to by this identifier.

    returnPage

    string

    To return to the specified page.

    returnButtonLabel

    string

    To use the specified label for the return button. This is useful when this page is invoked from multiple locations or pages.

    autoPreviewIndicator

    Boolean

    To force the system to perform Preview before displaying approval requests.

    hideSubmitWithAttachments

    Boolean

    Indicator to instruct the system to hide the Submit with Attachments button.

    headerSObjectId

    ID of the standard object

    The ID to be rendered as a link in the header of the page, if different from the context object. This is used to display the Quote link instead of Cart or Product Configuration link.

    headerSObjectTitle

    string

    The title or label to display as a link in the header next to the ID, if you display a value other than the context object's Name field value.

  7. Check the syntax of your formula field and click Next.
  8. Select visibility for your required profiles and click Next.
  9. Select appropriate page layouts to display the new field and click Save.