function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AB003AB003 

Creating a CLone functionalities

Hi, I need help to create a clone functionalities on account. Bascially the clone should clone some field. Can we do it with Onclick Javascript? My Visualforce skills in not good. Or if you give me a starting point, I will try to create a clone button. THere are many blogs on this but I didn't find a simple one.

 

Any help will be really appreciated.

 

Thanks

AB.

venkatsforcevenkatsforce

Assign that clone button as detailpage button and write the functionalities in executejavascript and call the apexclass through that custombutton............then u get the output.............

RajaMohanRajaMohan

AB,

 

Onclick Javascript is the best solution for this. In the onClick call a javascript function. In that function write the following code

 

document.getElementById("{!$Component.theForm.thePageBlock.MainInfo.Instancecopy.InstancecopyValue}").value = document.getElementById("{!$Component.theForm.thePageBlock.MainInfo.Instance.InstanceValue}").value;

 

Hope this helps you out.

 

Regards

Raja

AB003AB003

Hi, This didn't work. But I used another URL to clone the account and it is working.

 

Raja I need advice, With requirements at my company,  I need create a button where info from acount and contact has to flow back and should create a lead. To elaborate. I had a lead "X". X was convereted to accounts and contacts and they are doing business with us. Now, they want to use some other product. So, from account, I should pull info like phone, email, name from contact and pass these values and create a lead.

 

I hope you understand what I mean. DO you have any idea how to do that. Any code.

 

Thanks

AB.