I have a piece of Javascript in a Visualforce page. I would like to change the Status of a Case when a button is clicked invoking my Javascript function. I can't figure out the proper syntax for using a custom label from SFDC. Does anyone know how to accomplish this?
Javascript:
<script type="text/javaScript">
sforce.connection.sessionId = "{!GETSESSIONID()}";
function Escalate(){
var confirmMsg = confirm("Are you sure you want to escalate this case to the Client?");
var c = new sforce.SObject("Case");
if(confirmMsg == true){
c.id = "{!Case.Id}";
c.Escalate_to_Client__c = true;
c.Status = "{!$Label.Case_Status7__c}";
sforce.connection.update([c]);
}
}
</script>