{"id":865,"date":"2021-04-07T19:31:52","date_gmt":"2021-04-07T19:31:52","guid":{"rendered":"http:\/\/morecpq.com\/?p=865"},"modified":"2021-05-27T19:53:57","modified_gmt":"2021-05-27T19:53:57","slug":"cpq-related-list-buttons","status":"publish","type":"post","link":"https:\/\/morecpq.com\/index.php\/2021\/04\/07\/cpq-related-list-buttons\/","title":{"rendered":"CPQ &#8211; Related List Buttons"},"content":{"rendered":"\n<p>Edit Lines button on Quotes related list on Opportunity page.  Boom.<\/p>\n\n\n\n<p>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:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:12px\"><code>HYPERLINK('\/apex\/sbqq__sb?scontrolCaching=1&amp;id='+Id, IMAGE(\"https:\/\/i.imgur.com\/MIxQsK4.png\", \"Edit Lines\", 25, 75), \"_self\")<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"822\" height=\"440\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-11.png?resize=822%2C440\" alt=\"\" class=\"wp-image-1058\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-11.png?w=822&amp;ssl=1 822w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-11.png?resize=300%2C161&amp;ssl=1 300w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-11.png?resize=768%2C411&amp;ssl=1 768w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><\/figure>\n\n\n\n<p>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).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-6.png?resize=427%2C207\" alt=\"\" class=\"wp-image-866\" width=\"427\" height=\"207\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-6.png?w=482&amp;ssl=1 482w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-6.png?resize=300%2C146&amp;ssl=1 300w\" sizes=\"(max-width: 427px) 100vw, 427px\" \/><\/figure>\n\n\n\n<p>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:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:12px\"><code>HYPERLINK('https:\/\/&lt;your namespace>--sbqq.&lt;your instance(optional)>.visual.force.com\/apex\/ViewDocument?scontrolCaching=1&amp;id='&amp;Id, IMAGE(\"https:\/\/imgur.com\/1yQqMbA.png\", \"View\", 25, 49))<\/code><\/pre>\n\n\n\n<p>Example url:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:12px\"><code>HYPERLINK('https:\/\/morecpq--sbqq.visualforce.com\/apex\/ViewDocument?scontrolCaching=1&amp;id='&amp;Id, IMAGE(\"https:\/\/imgur.com\/1yQqMbA.png\", \"View\", 25, 49))<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"876\" height=\"425\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-13.png?resize=876%2C425\" alt=\"\" class=\"wp-image-1062\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-13.png?w=876&amp;ssl=1 876w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-13.png?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/05\/image-13.png?resize=768%2C373&amp;ssl=1 768w\" sizes=\"(max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p>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. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"514\" height=\"232\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-7.png?resize=514%2C232\" alt=\"\" class=\"wp-image-869\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-7.png?w=514&amp;ssl=1 514w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-7.png?resize=300%2C135&amp;ssl=1 300w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/figure>\n\n\n\n<p><strong>Install Links<br><\/strong><a href=\"https:\/\/test.salesforce.com\/packaging\/installPackage.apexp?p0=04t4x000000lwyC\" target=\"_blank\" rel=\"noreferrer noopener\">Sandbox<\/a> | <a href=\"https:\/\/login.salesforce.com\/packaging\/installPackage.apexp?p0=04t4x000000lwyC\" target=\"_blank\" rel=\"noreferrer noopener\">Production<\/a><\/p>\n\n\n\n<p>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. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip;<br \/><a href=\"https:\/\/morecpq.com\/index.php\/2021\/04\/07\/cpq-related-list-buttons\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">CPQ &#8211; Related List Buttons<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-865","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/comments?post=865"}],"version-history":[{"count":14,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/865\/revisions"}],"predecessor-version":[{"id":1069,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/865\/revisions\/1069"}],"wp:attachment":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/media?parent=865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/categories?post=865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/tags?post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}