Posts

Showing posts from April, 2015

Custom Button for Cloning Opportunity without items.

Image
Hi Developers !!. This post is regarding the   Custom Button   on Opportunity Object which  will help us to create clone opportunities without Line items with default values. Please follow the below steps: 1. Go to setup. 2. Create new custom button for Opportunity object. 3. Give the Label for button. 4. Set behavior as 'Execute JavaScript' and Content Source as 'OnClick JavaScript' . Paste the below snippet of code in your window. try { { !REQUIRESCRIPT("/soap/ajax/14.0/connection.js") } // Below query will helps you to copy all the fields from your opportunity. var result = sforce.connection.query("Select opp.Type, opp.StageName, opp.Amount, opp.AccountId,opp. CloseDate,opp.ForecastCategoryName From Opportunity opp WHERE opp.Id = '{!Oppor