CPQ – Related List Buttons

Edit Lines button on Quotes related list on Opportunity page. Boom.

This is one of the most requested features I get. This is a text formula field on the Quote object that has a link and an image. The image is a static image from imgur. The link is to the edit lines page passing the Id as a url parameter. The formula:

HYPERLINK('/apex/sbqq__sb?scontrolCaching=1&id='+Id, IMAGE("https://i.imgur.com/MIxQsK4.png", "Edit Lines", 25, 75), "_self")

Once you have your formula field, go into the page layout for the opportunity, and add this field as the first field in the quotes related list. Done! Also! You can do this on the Opportunity too! Just reference this button for the Primary Quote (if there is one).

View button on Quote Documents related list on Quotes page. Bam. This button is very similar to the one above. Different url and different imgur image. The concept is the same.The formula:

HYPERLINK('https://<your namespace>--sbqq.<your instance(optional)>.visual.force.com/apex/ViewDocument?scontrolCaching=1&id='&Id, IMAGE("https://imgur.com/1yQqMbA.png", "View", 25, 49))

Example url:

HYPERLINK('https://morecpq--sbqq.visualforce.com/apex/ViewDocument?scontrolCaching=1&id='&Id, IMAGE("https://imgur.com/1yQqMbA.png", "View", 25, 49))

The one small caveat with the quote document is that it is a parent child relationship so you can not place the view field as the first field in the related list. It has to be the second field under the Name field.

Install Links
Sandbox | Production

Feel free to modify and/or delete after install. The View button may not be as useful. Also keep in mind, you have to update your own page layouts in order to see these buttons.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.