How To: Reference the original record in a new cloned record
March 4, 2017
How To: Load a Salesforce or Visualforce page after saving on the Clone, Copy or Edit Super Clone pages
March 4, 2017

How To: Load the native edit page after cloning a record

Use the URL parameter ‘saveURL2’ to redirect the user to the native edit page. This parameter accepts a URL encoded string of the native edit page, and ‘newid’ will be replaced with the created record’s Id.

The value of the saveURL2 parameter below ‘%2F%5Bnewid%5D%2Fe%3FretURL%3D%2F%5Bnewid%5D’ is a URL encoded string of ‘/[newid]/e?retURL=/[newid]’. On saving the new cloned record, the ‘[newid]’ value will be replaced with the new record id, and the native edit page will load with a location like ‘https://na1.salesforce.com/006380000012345/?e?retURL=/006380000012345’.

Super Clone

/apex/dh_superclone__superclone?rid={!Opportunity.Id}&cfg=MyConfig&saveURL2=%2F%5Bnewid%5D%2Fe%3FretURL%3D%2F%5Bnewid%5D

Super Clone Pro

/apex/lcrm_scp__scpclone?rid={!Opportunity.Id}&cfg=MyConfig&saveURL2=%2F%5Bnewid%5D%2Fe%3FretURL%3D%2F%5Bnewid%5D

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.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
Read more