You need to sign in to do that
Don't have an account?
picnichouse
Help with a simple custom button?
Hi,
I was hoping someone could help me create a custom button for my opportunity detail layout (SF professional). Here's what I need it to do:
* Set the Opportunity to Closed Won
* Set the Close Date to 2/2/2222
* Set the custom field Win Date to TODAY
I've never done any of this stuff before so I'm not sure where to start. For example, should I use javascript, a visualforce page, or an s-control?
Any help would be much appreciated!
Andrew
That's very similar to this:
http://blogs.salesforce.com/support/2008/07/the-quick-case.html
In that example it's setting the case status to Closed, but the concept is nearly the same. You'll want to change it to edit an Opportunity instead, and set something like
opp.Win_Date__c = new Date();
(that will set it to be today)
Cool - except I'm getting this error:
A problem with the OnClick JavaScript for this button or link was encountered:
{faultcode:'sf:API_DISABLED_FOR_ORG', faultstring:'API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner', detail:{UnexpectedErrorFault:{exceptionCode:'API_DISABLED_FOR_ORG', exceptionMessage:'API is not enabled for this Organization or Partner', }, }, line:'1019', expressionBeginOffset:'29196', expressionEndOffset:'29212', sourceId:'1106863424', sourceURL:'https://na6.salesforce.com/soap/ajax/13.0/connection.js', }
How do I enable the API? I have Professional edition.