Posts

Showing posts with the label custom clone

Custom clone button in salesforce

Image
Custom clone button Ever faced a situation where you need to create a custom clone button. For example, you want to clone a lead record and you have a check-box on lead which you do not want to copy on the new record. In this article, we will see how to create a custom clone button. Use case : User wants to clone the lead record. There is a check-box on lead called "Data migrated record" whose value should not be copied. Step 1) Create a custom detail page button. Step 2) Put following url for the button created in step 1 : /{!Lead.Id}/e?clone=1&retURL=%2F{!Lead.Id}&00N9000000E9daG=false Let us analyse this url : a) {!Lead.Id} : Id of the original record from which new record has been cloned. b) clone=1 : url parameter which copies the value from original record to new record c) retURL=%2F{!Lead.Id} : specifies the page which should be opened when Cancel button is clicked d) 00N9000000E9daG=false : This is the id of check-box named "Data migra