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