You need to sign in to do that
Don't have an account?
Rob Koch 1
Custom clone button question
Hello. I am working on a custom button that will basically create a new record prepopulated with the values on the original record.
But I do not want any related child items to be carried over.
How do I ensure that only the values come over, with no related items?
But I do not want any related child items to be carried over.
How do I ensure that only the values come over, with no related items?
Have you tried checking and I found the below link that has a similar implementation but it has child records as well but you could customize it as per your use case to not clone the child records.
>>https://www.salesforceamazings.com/2018/11/how-to-clone-records-using-custom.html
>> http://christopheralunlewis.blogspot.com/2012/04/clone-plus-clone-salesforce-objects.html
>> https://help.salesforce.com/articleView?id=000316430&type=1&mode=1
In above the steps are mentioned as below:
In Lightning Experience
Navigate to Gear icon | Object Manager | Accounts | Buttons, links, and actions | New button or link.
Enter the following in each of the fields:
Label: Clone
Name: Clone
Description: Button to clone Accounts
Display Type: Detail Page Button
Behavior: Display in existing window without sidebar or header
Content Source: URL
Link: /{!Account.Id}/e?clone=1
Once the button has been created it will need to be added to the Account page layout. So navigate to Setup | Object Manager | Accounts | Page Layouts.
Edit the Layout you want to add the new button to.
Go to the Mobile & Lightning Actions section and look for the Clone button you created and add it in the Salesforce Mobile and Lightning Experience Actions section of the page layout.
Click Save.
I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.
Regards,
Anutej