{"id":2243,"date":"2023-03-15T00:48:37","date_gmt":"2023-03-15T00:48:37","guid":{"rendered":"https:\/\/morecpq.com\/?p=2243"},"modified":"2023-03-15T00:48:38","modified_gmt":"2023-03-15T00:48:38","slug":"product-option-setting-bundled-makes-quantity-multiply-by-parent-quantity","status":"publish","type":"post","link":"https:\/\/morecpq.com\/index.php\/2023\/03\/15\/product-option-setting-bundled-makes-quantity-multiply-by-parent-quantity\/","title":{"rendered":"Product Option &#8211; Setting Bundled makes quantity multiply by parent quantity"},"content":{"rendered":"\n<p>If you&#8217;re here, it&#8217;s likely you&#8217;re banging your head to figure out how to make a product option say &#8220;included&#8221; in the line editor WITHOUT multiplying its quantity by its parent&#8217;s quantity.  Currently, the Bundled checkbox on the Product Option is the only way to get the line editor to say &#8220;Included&#8221; on those option lines.  So you can not use the Bundled checkbox on the Product Option, unfortunately.  But wait!  Good news!  We made a solution!  It involves a new field on the Option and a Price Rule!  See below!<\/p>\n\n\n\n<p><strong>Product Option: New Field (Checkbox): Included (Included__c)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"721\" height=\"228\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2023\/03\/Snip-Product-Option-Salesforce.png?resize=721%2C228&#038;ssl=1\" alt=\"\" class=\"wp-image-2249\"\/><\/figure>\n\n\n\n<p><strong>Price Rule: Before Calculate &#8211; Default Values<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"940\" height=\"231\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2023\/03\/Snip-Before-Calculate-Default-Values-Salesforce-2.png?resize=940%2C231&#038;ssl=1\" alt=\"\" class=\"wp-image-2244\"\/><\/figure>\n\n\n\n<p><strong>Price Action: SBQQ__QuoteLine__c =&gt; SBQQ__Bundled__c = Formula: IF(SBQQ__ProductOption__r.Included__c, TRUE, SBQQ__Bundled__c)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"940\" height=\"194\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2023\/03\/Snip-41-Salesforce-1.png?resize=940%2C194&#038;ssl=1\" alt=\"\" class=\"wp-image-2247\"\/><\/figure>\n\n\n\n<p><strong>The Install<br><\/strong><a href=\"https:\/\/test.salesforce.com\/packaging\/installPackage.apexp?p0=04t4x000000r1Od&amp;isdtp=p1\" target=\"_blank\" rel=\"noreferrer noopener\">Sandbox<\/a> | <a href=\"https:\/\/login.salesforce.com\/packaging\/installPackage.apexp?p0=04t4x000000r1Od&amp;isdtp=p1\" target=\"_blank\" rel=\"noreferrer noopener\">Production<\/a><\/p>\n\n\n\n<p>After you install, be sure to run the below script in the execute anonymous popup in the developer console.  Click <a href=\"https:\/\/login.salesforce.com\/_ui\/common\/apex\/debug\/ApexCSIPage\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> to open the developer console in production and <a href=\"https:\/\/test.salesforce.com\/_ui\/common\/apex\/debug\/ApexCSIPage\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> to open it in sandbox.<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:12px\"><code>MoreCPQPostInstall.ProductOptionBundled_Fix_PostInstall();<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"314\" height=\"373\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-23.png?resize=314%2C373\" alt=\"\" class=\"wp-image-920\" srcset=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-23.png?w=314&amp;ssl=1 314w, https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2021\/04\/image-23.png?resize=253%2C300&amp;ssl=1 253w\" sizes=\"(max-width: 314px) 100vw, 314px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"508\" height=\"407\" src=\"https:\/\/i0.wp.com\/morecpq.com\/wp-content\/uploads\/2023\/03\/Snip-Developer-Console-10.png?resize=508%2C407&#038;ssl=1\" alt=\"\" class=\"wp-image-2253\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re here, it&#8217;s likely you&#8217;re banging your head to figure out how to make a product option say &#8220;included&#8221; in the line editor WITHOUT multiplying its quantity by its parent&#8217;s quantity. Currently, the Bundled checkbox on the Product Option is the only way to get the line editor to say &#8220;Included&#8221; on those option &hellip;<br \/><a href=\"https:\/\/morecpq.com\/index.php\/2023\/03\/15\/product-option-setting-bundled-makes-quantity-multiply-by-parent-quantity\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">Product Option &#8211; Setting Bundled makes quantity multiply by parent quantity<\/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-2243","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\/2243","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=2243"}],"version-history":[{"count":6,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/2243\/revisions"}],"predecessor-version":[{"id":2254,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/posts\/2243\/revisions\/2254"}],"wp:attachment":[{"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/media?parent=2243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/categories?post=2243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/morecpq.com\/index.php\/wp-json\/wp\/v2\/tags?post=2243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}