You need to sign in to do that
Don't have an account?
Stefan
Button to update opportunity stage
I am trying to use a button to update opportunity stage to Finance Approved. What is wrong with the below code which gives me an error message: Invalid Field: No such column 'Stage' on entity 'opportunity'
<html>
<head>
<script src="/soap/ajax/9.0/connection.js"></script>
<script language="JavaScript">
var temp= new sforce.SObject("Opportunity");
temp["Id"]="{!Opportunity.Id}";
temp["Stage"]="Finance Approved";
try
{ sforce.connection.update([temp]);
} catch(e)
{ alert(e)
}
window.top.location.href = "/{!Opportunity.Id}";
</script>
</head>
</html>
Or, you could use the SForce Explorer (a.k.a. Apex Explorer) found at the link below. Another great thing about using the Explorer is that you can develop and debug your SOQL queries with it before implementing in your code.
SForce Explorer 8.0 : http://wiki.apexdevnet.com/index.php/Apex_Explorer