How To: Redirect to the Lightning Edit Modal After Saving
April 22, 2021
How To: Indicate When a Value Was Changed on a Super Clone Pro Clone Page
October 31, 2022

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.

<apex:page lightningStylesheets="true">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>

    <lcrm_scp:ScpClone />
        
    <script type="text/javascript">
	jq$ = jQuery.noConflict();
        jq$(window).on('load', function() {
            jq$('.col-sel input:checkbox').each(function() {
                this.checked = false; 
            });
        });
    </script>
</apex:page>

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 look something like this.

/apex/CloneUnchecked?rid={!YourObject.Id}&cfg=YourConfig&lss=1

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