You are here:
Create Advanced Approvals Buttons
Create buttons that let sales reps submit or recall a record for approval. Then add these buttons to the objects you’ve enabled for approval. (Salesforce CPQ Managed Package)
Required Editions
| Available in: Salesforce CPQ Summer ‘16 and later with Advanced Approvals 3.1 and later |
In this example, we create buttons for the CPQ Quote object. However, you can create buttons for an object that you’d like. Replace Quote with the object label and Quote__c with the object’s API name.
Note If you use an object that has separate versions but the same name in both Salesforce CPQ
and Salesforce, such as Quote__c and Quote, make sure that all your references refer to the
correct version.
If you’re creating buttons in a Lightning Community, use a global action of the Type: Custom Visualforce that refers to the Preview Approvals Visualforce page and then add the action to the Quote’s Lightning Actions. When a user clicks the Preview Approval button, the Preview Approvals page for the quote opens.
-
Create Visualforce pages for your buttons.
- From Setup, in the Quick Find box, enter Visualforce Pages, and then select Visualforce Pages.
- Click New.
-
Create a Visualforce page that sales reps use when submitting a record for approval. Use
the following values.
- Label: SubmitQuote
- Name: SubmitQuote
- Visualforce
Markup:
<apex:page standardController="SBQQ__Quote__c" extensions="QuoteExtController" action="{!onSubmit}"> <apex:pageMessages /> </apex:page>
-
Create a Visualforce page that sales reps use when recalling quotes. Use the following
values.
- Label: RecallQuote
- Name: RecallQuote
- Visualforce
Markup:
<apex:page standardController="SBQQ__Quote__c" extensions="QuoteExtController" action="{!onRecall}"> <apex:pageMessages /> </apex:page>
-
Create buttons and link them to your Visualforce pages.
- From Setup, in the Quick Find box, enter Objects, then select Objects. Select the Quote object for the Salesforce CPQ package.
- From the Buttons, Links, and Actions related list, click New Button or Link.
-
Create these buttons. Each button has a Display Type field of Detail Page Button and a
height of 600.
- Submit for Approval
-
- Button Label: Submit for Approval
- Button Name: Submit_for_Approval
- Behavior: Display in existing window with sidebar
- Content Source: Visualforce Page
- Visualforce Page: Choose the SubmitQuote page you made in Step 1c.
- Recall Approval
-
- Button Label: Recall Approval
- Button Name: Recall_Approval
- Behavior: Display in existing window with sidebar
- Content Source: Visualforce Page
- Visualforce Page: Choose the RecallQuote page you made in Step 1d.
- Preview Approval
-
Note To create a Preview Approval button in a Lightning Community, use a global action of the Type: Custom Visualforce that refers to the Preview Approvals Visualforce page. Add the action to the quote’s Lightning Actions. When a user clicks the Preview Approval button, the Preview Approvals page for the quote opens.- Button Label: Preview Approval
- Button Name: Preview_Approval
- Behavior: Display in an existing window with a sidebar.
- Button or Link URL:
/apex/sbaa__PreviewApprovals?Id={!SBQQ__Quote__c.Id} - Link Encoding: Unicode (UTF-8)
Did this article solve your issue?
Let us know so we can improve!

