You need to sign in to do that
Don't have an account?

Queue id from name in javascript
Hi,
I want to make a button that escalates a Case depending on what queue you have choosen from a picklist. I have only found a way to store the name of the queue in the picklist which so I need to translate the queue name to id in javascript.
Any clues on how to do that?¨
So far my code looks like...
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} var newRecords = []; var c = new sforce.SObject("Case"); c.id ="{!Case.Id}"; var escalation = "{!Case.Escalation__c}"; var q = new sforce.SObject("Queue"); q.Name = escalation; c.OwnerId = "q.Id"; newRecords.push(c); result = sforce.connection.update(newRecords); window.location.reload();
thanks
Martin
Just wanted to share my solution:
This is the javascript code for a button that escalates the Case depending on what Queue name that is selected from a picklist.