April 1, 2019

How To: Show a list of records to select from with the Super Clone Pro Copy page

The Super Clone Pro copy page allows you to copy related lists from one parent record to another parent record. The page has lookup field that lets you select the new parent record. This uses Salesforce’s default popup window to select a new record. This default search may show too many records. The following code is an example of how to display a filtered list of possible records to choose […]
June 2, 2019

How To: Add CSS Style to the Clone, Edit, and Copy pages

Changing the way the Super Clone Pro pages look can be done by adding CSS styles into a page that wrap around the Clone, Copy, and Edit components. Use CSS selectors to specify columns or inputs that should be modified. This includes things like making an input text area wider, adding a minimum width, setting a background color, or other styling attributes. Create a Visualforce page. This page will contain […]
January 30, 2020

How To: Clone files and documents in Salesforce

Documents and files are stored two different ways in Salesforce. Traditionally, files were saved in an object called “Attachments”. They were a direct child of the object they related to. Now Salesforce stores fines in a much more complex set of objects. Benefits of the new structure include versioning and the ability for one copy of a document to be referenced by multiple objects. Super Clone Pro has the ability […]
July 5, 2020

How To: Select Record when Copying to a Different Record Type

The copy page is typically used to copy related lists from one parent record to another record of the same object type. It also can copy related lists to another object type when the child object has lookup relationships to both from and to object types. The built in prompt field expect the same object type, so a little custom code is needed to prompt for the other object type. […]
September 1, 2020

Submit a Queueable to Clone Records

Below is an example that will submit a Queueable job to clone using Super Clone Pro. Visualforce <apex:page standardController="Account" extensions="accountCloneController" lightningStylesheets="true"> <h1> Clone: {!account.Name} </h1> <apex:form> <apex:commandButton action="{!cancel}" value="Cancel" immediate="true"/> <apex:commandButton action="{!saveClone}" value="Save Clone and Return" immediate="true"/> </apex:form> </apex:page> Controller extension public class accountCloneController { Account sObj; public accountCloneController(ApexPages.StandardController con) { sObj = (Account) con.getRecord(); } public pageReference saveClone() { if (sObj != null && sObj.Id != null) { System.enqueueJob(new […]
November 12, 2020

How to: make the Super Clone Pro Edit Page redirect back to itself after save

Create a Visualforce page and Apex page controller to help the redirection logic. My example Visualforce page is named ScpEditRedirect, and the Apex controller is named ScpEditRedirectController. Finally, create a custom button that references this new custom page with the Super Clone Pro url parameters. Apex Controller: ScpEditRedirectController Visualforce Page: ScpEditRedirect <apex:page cache="false" controller="ScpEditRedirectController" action="{!redirect}"> <apex:form > <apex:commandButton action="{!redirect}" value="Load Edit Page" /> </apex:form> </apex:page> Custom Button
April 22, 2021

How To: Redirect to the Lightning Edit Modal After Saving

This is an example of the custom button url that would be used to redirect a user to the Lightning Edit Modal. We also need to include the backgroundContext URL parameter, so the record page is loaded underneath the window. Here is an example that references a Case object. The beginning of the URL is standard up to the saveURL2 parameter. The saveURL2 parameter is an encoded URL that contains […]
October 14, 2021

How To: Load the Super Clone Pro Clone or Copy Page with Child Records Unchecked

The Clone and Copy page components can be embedded in a wrapper Visualforce page. This allows you to apply styles and use JavaScript to manipulate the page. This example shows how to uncheck all the child selection checkboxes on the page load. Finally, update the custom button to reference this new Visualforce page. Replace the name of the packaged page name “lcrm_scp__scpclone” or “lcrm_scp__scpcopy” with the new name. It should […]
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
Read more