How To: Split Clone Into Multiple Steps by Chaining Pages
December 1, 2022How To: Reference the Newly Cloned Record Id in saveURL2
February 27, 2023How To: Redirect to the Edit Lines Page After Cloning a Quote in CPQ
After cloning a quote with Super Clone Pro, the default behavior is to redirect to the new Quote record. Sometimes it is helpful to go directly to the Edit Lines page of the CPQ, so the quote can be recalculated and edited.
The redirection can be accomplished by setting the “saveURL2” parameter in the Super Clone Pro custom button. Below is how your button may look.
/apex/lcrm_scp__scpclone?rid={!SBQQ__Quote__c.Id}&cfg=testconfig&saveURL2={!URLENCODE(URLFOR('/apex/sbqq__sb'))}%3FscontrolCaching%3D1%26id%3D[newid]%23quote%2Fle%3FqId%3D[newid]
The “saveURL2” parameter accepts a URL encoded string. First, the encoded host and CPQ visualforce name is set, and this is followed by the URL parameters for that page that are also URL encoded.
The encoded “[newid]” is replaced by the Super Clone Pro logic with the newly cloned record id.