Skip to content

Instantly share code, notes, and snippets.

@ChuckJonas
Last active November 18, 2018 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChuckJonas/fd35b1071864047e5ee9bc037b1f7123 to your computer and use it in GitHub Desktop.
Save ChuckJonas/fd35b1071864047e5ee9bc037b1f7123 to your computer and use it in GitHub Desktop.
Clone Override
<apex:page tabStyle="Lead" standardController="Lead" extensions="LeadCloneWithActivitiesController" >
<apex:form >
<apex:sectionHeader title="Cloning" subtitle="{!Lead.Name} and Activities ({!clone.Tasks.size + clone.Events.size})" />
<apex:pageBlock title="Lead Clone" tabStyle="Lead" >
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Cancel" action="{!cancel}" />
<apex:commandButton value="Save" action="{!saveClone}" />
</apex:pageBlockButtons>
<apex:outputPanel rendered="{!leadLayout!=null && clone != null}">
<apex:repeat value="{!leadLayout.layoutSections}" var="section">
<apex:pageBlockSection title="{!section.label}" collapsible="false">
<apex:repeat value="{!section.layoutColumns}" var="col">
<apex:repeat value="{!col.layoutItems}" var="item">
<apex:inputField
rendered="{!item.behavior = EditEnum && item.field != 'CampaignId' && item.field != 'Address'}"
value="{!clone[item.field]}"
/>
</apex:repeat>
</apex:repeat>
</apex:pageBlockSection>
</apex:repeat>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment