Custom button on Opportunity to clone opportunity with its related List (object)
Create a new Detail Page Button on the Opportunity object.
Set Behavior to Execute JavaScript and Content Source to OnClick JavaScript
Paste the Below snippet of code in the window
{!REQUIRESCRIPT("/soap/ajax/39.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/apex.js")}
var retStr;
retStr = sforce.apex.execute("CloneOpportunitywithRelatedObject","cloneOpportunity",
{oppId:"{!Opportunity.Id}"}); location.replace('/' + retStr);
Create a new Apex class and paste the below snippet of code
{!REQUIRESCRIPT("/soap/ajax/39.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/apex.js")}
var retStr;
retStr = sforce.apex.execute("CloneOpportunitywithRelatedObject","cloneOpportunity",
{oppId:"{!Opportunity.Id}"}); location.replace('/' + retStr);
Create a new Apex class and paste the below snippet of code
|
Your blog is nice. I believe this will surely help the readers who are really in need of this vital piece of information. Thanks for sharing and kindly keep updating.
ReplyDeleteBest Spoken English Training Institute in Adyar
Spoken English Classes in Gandhi Nagar
Spoken English Classes in ECR
Spoken English Center in Porur
Spoken English in Ramapuram
Spoken English Classes in Moulivakkam
Spoken English Course near me