I made a class that assigns cases to the correct person's queue when they click a button. That button runs some javascript that executes a method in a global class. This button resides on the Case page layout. How can i get the case number of the current case using a query. I tried something like shown below, but it returns null. Is there a way to do this? Any thoughts? Thanks!
c = [SELECT Id FROM Case WHERE Id =: '{!Case.Id}'];
This is my Javascript:
{!REQUIRESCRIPT("/soap/ajax/27.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/27.0/apex.js")}
sforce.apex.execute("assignToMyQueue","AssignCaseMethod", {sUserID:"{!User.Id}"}, {caseId:'{!Case.Id}'});
