Download page Configuring the Cart Approvals Page and Apex Class.
Configuring the Cart Approvals Page and Apex Class
Go to Setup > Develop > Apex Classes and clickNew.
Copy and paste the code below and ensure the name of the new class is "CartViewController".
/**
* Apttus CPQ Approval
* CartViewController
*
* @2012-2013 Apttus Inc. All rights reserved.
*/
public with sharing class CartViewController {
// context id
private ID contextId = null;
// approval type
private String approvalType = null;
/**
* Class Constructor
* @param stdController the standard controller
*/
public CartViewController(ApexPages.StandardController stdController) {
// get context id
contextId = stdController.getId();
// get default approval context type
//approvalType = SystemUtil.getDefaultApprovalCtxType();
approvalType = 'cart';
}
/**
* Gets context object Id
*/
public ID getCtxObjectId() {
return contextId;
}
/**
* Gets cart approval context type
*/
public String getCtxApprovalType() {
return approvalType;
}
}
CODE
Save the class, go to Pages, and click New.
Copy and paste the following code into the Visualforce Markup window
Make sure theName value is CartView and click Save.
Go to Create > Objects and click Quote/Proposal.
Scroll to Page Layouts and click Edit for the page layout you will add Cart Approvals to.
Drag CartView from the Visualforce Pages window and drop it onto the page.
Display the Visualforce Page Properties for CartView and select Show scrollbars.
Save the changes to the page.
The CartView page acts like a related list for displaying the cart approvals, so that the next time you go to a quote/proposal record submitted for approval from the cart, the approval steps and associated approvers will be displayed.
You must finish configuring the other objects before the feature will work as expected.