query queues belonging to a particular sobject

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












Is there a way to query only queues tied to a particular sobject?



I have the following query which gets me all the queues.



Select id, name from group where Type = 'Queue'


I want all queues which are tied only to sobject : CustomObject__C. How can I modify the above query or is there a better approach?










share|improve this question



























    up vote
    1
    down vote

    favorite












    Is there a way to query only queues tied to a particular sobject?



    I have the following query which gets me all the queues.



    Select id, name from group where Type = 'Queue'


    I want all queues which are tied only to sobject : CustomObject__C. How can I modify the above query or is there a better approach?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Is there a way to query only queues tied to a particular sobject?



      I have the following query which gets me all the queues.



      Select id, name from group where Type = 'Queue'


      I want all queues which are tied only to sobject : CustomObject__C. How can I modify the above query or is there a better approach?










      share|improve this question













      Is there a way to query only queues tied to a particular sobject?



      I have the following query which gets me all the queues.



      Select id, name from group where Type = 'Queue'


      I want all queues which are tied only to sobject : CustomObject__C. How can I modify the above query or is there a better approach?







      query queue






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      pranav prashant

      150215




      150215




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          there is a QueueSobject from which you will get the queues along with the object assigned to it.
          Please check below query-
          SELECT QueueId, Queue.Name, SobjectType FROM QueueSobject WHERE SobjectType = 'CustomObject__C'






          share|improve this answer








          New contributor




          pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.
























            up vote
            3
            down vote













            You can use QueueSobject for this. QueueSobject represents the mapping between a queue Group and the sObject types associated with the queue, including custom objects.



            Sample query:



             QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from 
            QueueSobject where SobjectType = 'Case'];





            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "459"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f236295%2fquery-queues-belonging-to-a-particular-sobject%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              3
              down vote



              accepted










              there is a QueueSobject from which you will get the queues along with the object assigned to it.
              Please check below query-
              SELECT QueueId, Queue.Name, SobjectType FROM QueueSobject WHERE SobjectType = 'CustomObject__C'






              share|improve this answer








              New contributor




              pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                up vote
                3
                down vote



                accepted










                there is a QueueSobject from which you will get the queues along with the object assigned to it.
                Please check below query-
                SELECT QueueId, Queue.Name, SobjectType FROM QueueSobject WHERE SobjectType = 'CustomObject__C'






                share|improve this answer








                New contributor




                pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



















                  up vote
                  3
                  down vote



                  accepted







                  up vote
                  3
                  down vote



                  accepted






                  there is a QueueSobject from which you will get the queues along with the object assigned to it.
                  Please check below query-
                  SELECT QueueId, Queue.Name, SobjectType FROM QueueSobject WHERE SobjectType = 'CustomObject__C'






                  share|improve this answer








                  New contributor




                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  there is a QueueSobject from which you will get the queues along with the object assigned to it.
                  Please check below query-
                  SELECT QueueId, Queue.Name, SobjectType FROM QueueSobject WHERE SobjectType = 'CustomObject__C'







                  share|improve this answer








                  New contributor




                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  share|improve this answer



                  share|improve this answer






                  New contributor




                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 2 hours ago









                  pranaya bhoyar

                  762




                  762




                  New contributor




                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  pranaya bhoyar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






















                      up vote
                      3
                      down vote













                      You can use QueueSobject for this. QueueSobject represents the mapping between a queue Group and the sObject types associated with the queue, including custom objects.



                      Sample query:



                       QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from 
                      QueueSobject where SobjectType = 'Case'];





                      share|improve this answer
























                        up vote
                        3
                        down vote













                        You can use QueueSobject for this. QueueSobject represents the mapping between a queue Group and the sObject types associated with the queue, including custom objects.



                        Sample query:



                         QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from 
                        QueueSobject where SobjectType = 'Case'];





                        share|improve this answer






















                          up vote
                          3
                          down vote










                          up vote
                          3
                          down vote









                          You can use QueueSobject for this. QueueSobject represents the mapping between a queue Group and the sObject types associated with the queue, including custom objects.



                          Sample query:



                           QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from 
                          QueueSobject where SobjectType = 'Case'];





                          share|improve this answer












                          You can use QueueSobject for this. QueueSobject represents the mapping between a queue Group and the sObject types associated with the queue, including custom objects.



                          Sample query:



                           QueueSobject que = [Select Id, SobjectType, QueueId, Queue.Name from 
                          QueueSobject where SobjectType = 'Case'];






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 2 hours ago









                          Pragati Jain

                          72048




                          72048



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f236295%2fquery-queues-belonging-to-a-particular-sobject%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              List of Gilmore Girls characters

                              Confectionery