function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrew S.ax1373Andrew S.ax1373 

Using Beatbox - Want to retrieve cases from a queue - Need QueueID

Hello,

 

I'm using beatbox to access Force API.  I connect fine.  For my companys enterprise account, most of beatboxes demo functions work fine.  But, I'm needing to modify the code to accomplish my objective of course.

 

sid = 00D7000000086I1!ARAAQKW7VAXR2utITdpPTpfz_5V0sUzxXkr0AeU3U5VBhAd4JIwwovCMiCz31n0aVJdMdXBs6DOL1E_2Lu0NTL9FtlwlEcH3
welcome Andrew Stanton

getServerTimestamp 2012-06-14T19:30:20.781Z

 

My objective is to be able to find the case records in a queue.  I'm guessing that first I need to get the ID for the Queue using query.  Then, use retrieve to get the specific fields I want.

 

    def query(self):
        print "\nquery"            
        qr = svc.query("select Id, Name from Account")
        self.dumpQueryResult(qr)

 Above is the demo code provided by beatbox.  I think that the string for the query controls what records we get.  I thought perhaps if I did the following I would get a list of the queues and their IDs.  However, the command did not work.

 

"select Id, Name from QueueSobject"

 

Python returned:

 

Traceback (most recent call last):
  File "<pyshell#32>", line 1, in <module>
    demo.query()
  File "C:\Python27\superfell-Beatbox-aaa0a4b\demo.py", line 48, in query
    qr = svc.query("select Id, Name from QueueSobject")
  File "C:\Python27\superfell-Beatbox-aaa0a4b\beatbox.py", line 68, in query
    return QueryRequest(self.__serverUrl, self.sessionId, self.batchSize, soql).post(self.__conn)
  File "C:\Python27\superfell-Beatbox-aaa0a4b\beatbox.py", line 307, in post
    raise SoapFaultError(faultCode, faultString)
SoapFaultError: 'INVALID_FIELD' "INVALID_FIELD: select Id, Name from QueueSobject ^ ERROR at Row:1:Column:12 No such column 'Name' on entity 'QueueSobject'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

 

Is it perhap Customer Portal users can't access this object? My research indicates customer portal users would be customers of my company who access case data through the portal we provide.  I am an employee, so I don't think it applies to me.

 


I will continue to sift through documentation to understand the API better, but any help would be appreciated.

 

Regards

~ Andrew S

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

QueueSObject has no name field, which is what the error message tell you. If you want the name of the queue, then you can get that from the queue relationship, e.g.

 

select Queue.Name, SobjectType, Id, from QueueSobject

 

I'd recommend you get setup with one of the schema explorer/query builder tools, it makes trying & discovering these things much easier, try SoqlX, Force.com IDE, ApexExplorer or workbench,

All Answers

SuperfellSuperfell

QueueSObject has no name field, which is what the error message tell you. If you want the name of the queue, then you can get that from the queue relationship, e.g.

 

select Queue.Name, SobjectType, Id, from QueueSobject

 

I'd recommend you get setup with one of the schema explorer/query builder tools, it makes trying & discovering these things much easier, try SoqlX, Force.com IDE, ApexExplorer or workbench,

This was selected as the best answer
Andrew S.ax1373Andrew S.ax1373

Well if it isn't the author of beatbox himself!

 

I think you have an extra comma, but I eventually figured that out.  Your recommendation to use such a tool was of course a good idea.  I ended up using ApexExplorer which uses Adobe AIR and it worked pretty well.  I found out soon that my idea of our "queue" was different than the SOAP database's idea of a queue...

 

What I was hunting for was actually the OwnerID field of a case object.  OwnerID covers both "actual people" and "system people" (aka case queue, team bin, etc).  Since, I was hunting for a specific field value, I needed a filter on the cases that would limit the query results and allow me to confirm that I was in fact looking at the correct OwnerID.  The following query allowed me to do what I wanted:

 

SELECT Id, CaseNumber, Origin, Reason, IsClosed, OwnerId, Status FROM Case WHERE Status = 'New'

 

I confirmed it works with beatbox too.  Now, I need to figure out how to get the query function to print out more of the fields that I ask it too.

 

BTW, perhaps you might start the demo script by commenting out the password reset call.  That was a little unexpected.  Just a suggestion.

 

Regards

~ Andrew S