Is it possible to use ALL ROWS in SOSL query?

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
2
down vote

favorite












While preparing myself to the Developer 1 certification I met the following question:



A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this?




A) SOSL Search



B) SOQL Query on each object



C) SOQL Query that includes ALL ROWS



D) SOSL Search that includes ALL ROWS




It is clear from on multiple object types that we need to use SOSL. So, we are left with A) and D). I do not know which one of them is correct.



After googling, here is what I found:




SOQL statements can use the ALL ROWS keywords to query all records in an organization, including deleted records and archived activities.




And I was not able to find the ALL ROWS in the context of SOSL. So, is it possible to use ALL ROWS in SOSL query? And if it is, will it have the same effect as using it in SOQL?







share|improve this question



















  • Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
    – Prem Anandh
    Aug 6 at 7:53
















up vote
2
down vote

favorite












While preparing myself to the Developer 1 certification I met the following question:



A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this?




A) SOSL Search



B) SOQL Query on each object



C) SOQL Query that includes ALL ROWS



D) SOSL Search that includes ALL ROWS




It is clear from on multiple object types that we need to use SOSL. So, we are left with A) and D). I do not know which one of them is correct.



After googling, here is what I found:




SOQL statements can use the ALL ROWS keywords to query all records in an organization, including deleted records and archived activities.




And I was not able to find the ALL ROWS in the context of SOSL. So, is it possible to use ALL ROWS in SOSL query? And if it is, will it have the same effect as using it in SOQL?







share|improve this question



















  • Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
    – Prem Anandh
    Aug 6 at 7:53












up vote
2
down vote

favorite









up vote
2
down vote

favorite











While preparing myself to the Developer 1 certification I met the following question:



A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this?




A) SOSL Search



B) SOQL Query on each object



C) SOQL Query that includes ALL ROWS



D) SOSL Search that includes ALL ROWS




It is clear from on multiple object types that we need to use SOSL. So, we are left with A) and D). I do not know which one of them is correct.



After googling, here is what I found:




SOQL statements can use the ALL ROWS keywords to query all records in an organization, including deleted records and archived activities.




And I was not able to find the ALL ROWS in the context of SOSL. So, is it possible to use ALL ROWS in SOSL query? And if it is, will it have the same effect as using it in SOQL?







share|improve this question











While preparing myself to the Developer 1 certification I met the following question:



A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this?




A) SOSL Search



B) SOQL Query on each object



C) SOQL Query that includes ALL ROWS



D) SOSL Search that includes ALL ROWS




It is clear from on multiple object types that we need to use SOSL. So, we are left with A) and D). I do not know which one of them is correct.



After googling, here is what I found:




SOQL statements can use the ALL ROWS keywords to query all records in an organization, including deleted records and archived activities.




And I was not able to find the ALL ROWS in the context of SOSL. So, is it possible to use ALL ROWS in SOSL query? And if it is, will it have the same effect as using it in SOQL?









share|improve this question










share|improve this question




share|improve this question









asked Aug 6 at 7:44









iloveseven

4249




4249











  • Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
    – Prem Anandh
    Aug 6 at 7:53
















  • Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
    – Prem Anandh
    Aug 6 at 7:53















Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
– Prem Anandh
Aug 6 at 7:53




Hi, You can't use ALL ROWS optiono in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.
– Prem Anandh
Aug 6 at 7:53










2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










Answer is "A".



You can't use ALL ROWS option in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.






share|improve this answer























  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    Aug 6 at 8:09










  • It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
    – Prem Anandh
    Aug 6 at 8:22


















up vote
4
down vote













Answer will be A) SOSL Search



As, SOSL with All rows doesn't make any sense.



Here is the Scope of fields to search. One of the following values:



  • ALL FIELDS

  • NAME FIELDS

  • EMAIL FIELDS

  • PHONE FIELDS

  • SIDEBAR FIELDS

Refer RETURNING FieldSpec



RETURNING ***ObjectTypeName*** 
[(FieldList [WHERE conditionExpression] [USING Listview=listview name] [ORDER BY Clause] [LIMIT n] [OFFSET n])]
[, ObjectTypeName [(FieldList [WHERE conditionExpression] [ORDER BY Clause] [LIMIT n] [OFFSET n])]]


SOSL search is similar to Global Functionality which Salesforce provides and it doesn't search using ALL ROWS unlike SOQL.






share|improve this answer























  • Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
    – iloveseven
    Aug 6 at 8:08










  • SOSL doesn't have that purpose
    – Santanu Boral
    Aug 6 at 8:10










  • refer my updated answer
    – Santanu Boral
    Aug 6 at 8:18










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%2f227841%2fis-it-possible-to-use-all-rows-in-sosl-query%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
1
down vote



accepted










Answer is "A".



You can't use ALL ROWS option in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.






share|improve this answer























  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    Aug 6 at 8:09










  • It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
    – Prem Anandh
    Aug 6 at 8:22















up vote
1
down vote



accepted










Answer is "A".



You can't use ALL ROWS option in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.






share|improve this answer























  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    Aug 6 at 8:09










  • It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
    – Prem Anandh
    Aug 6 at 8:22













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Answer is "A".



You can't use ALL ROWS option in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.






share|improve this answer















Answer is "A".



You can't use ALL ROWS option in SOSL and but you can use this option in SOQL and it retrieve all the records inculding deleted one if it's in recycle bin.







share|improve this answer















share|improve this answer



share|improve this answer








edited Aug 6 at 8:03


























answered Aug 6 at 7:54









Prem Anandh

1718




1718











  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    Aug 6 at 8:09










  • It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
    – Prem Anandh
    Aug 6 at 8:22

















  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    Aug 6 at 8:09










  • It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
    – Prem Anandh
    Aug 6 at 8:22
















Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
– iloveseven
Aug 6 at 8:09




Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
– iloveseven
Aug 6 at 8:09












It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
– Prem Anandh
Aug 6 at 8:22





It appears in the docs that there is no such feature. The topic on the RETURNING keyword lists all the allowed SOQL-like keywords, and `ALL ROWS is not in there. developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/…
– Prem Anandh
Aug 6 at 8:22













up vote
4
down vote













Answer will be A) SOSL Search



As, SOSL with All rows doesn't make any sense.



Here is the Scope of fields to search. One of the following values:



  • ALL FIELDS

  • NAME FIELDS

  • EMAIL FIELDS

  • PHONE FIELDS

  • SIDEBAR FIELDS

Refer RETURNING FieldSpec



RETURNING ***ObjectTypeName*** 
[(FieldList [WHERE conditionExpression] [USING Listview=listview name] [ORDER BY Clause] [LIMIT n] [OFFSET n])]
[, ObjectTypeName [(FieldList [WHERE conditionExpression] [ORDER BY Clause] [LIMIT n] [OFFSET n])]]


SOSL search is similar to Global Functionality which Salesforce provides and it doesn't search using ALL ROWS unlike SOQL.






share|improve this answer























  • Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
    – iloveseven
    Aug 6 at 8:08










  • SOSL doesn't have that purpose
    – Santanu Boral
    Aug 6 at 8:10










  • refer my updated answer
    – Santanu Boral
    Aug 6 at 8:18














up vote
4
down vote













Answer will be A) SOSL Search



As, SOSL with All rows doesn't make any sense.



Here is the Scope of fields to search. One of the following values:



  • ALL FIELDS

  • NAME FIELDS

  • EMAIL FIELDS

  • PHONE FIELDS

  • SIDEBAR FIELDS

Refer RETURNING FieldSpec



RETURNING ***ObjectTypeName*** 
[(FieldList [WHERE conditionExpression] [USING Listview=listview name] [ORDER BY Clause] [LIMIT n] [OFFSET n])]
[, ObjectTypeName [(FieldList [WHERE conditionExpression] [ORDER BY Clause] [LIMIT n] [OFFSET n])]]


SOSL search is similar to Global Functionality which Salesforce provides and it doesn't search using ALL ROWS unlike SOQL.






share|improve this answer























  • Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
    – iloveseven
    Aug 6 at 8:08










  • SOSL doesn't have that purpose
    – Santanu Boral
    Aug 6 at 8:10










  • refer my updated answer
    – Santanu Boral
    Aug 6 at 8:18












up vote
4
down vote










up vote
4
down vote









Answer will be A) SOSL Search



As, SOSL with All rows doesn't make any sense.



Here is the Scope of fields to search. One of the following values:



  • ALL FIELDS

  • NAME FIELDS

  • EMAIL FIELDS

  • PHONE FIELDS

  • SIDEBAR FIELDS

Refer RETURNING FieldSpec



RETURNING ***ObjectTypeName*** 
[(FieldList [WHERE conditionExpression] [USING Listview=listview name] [ORDER BY Clause] [LIMIT n] [OFFSET n])]
[, ObjectTypeName [(FieldList [WHERE conditionExpression] [ORDER BY Clause] [LIMIT n] [OFFSET n])]]


SOSL search is similar to Global Functionality which Salesforce provides and it doesn't search using ALL ROWS unlike SOQL.






share|improve this answer















Answer will be A) SOSL Search



As, SOSL with All rows doesn't make any sense.



Here is the Scope of fields to search. One of the following values:



  • ALL FIELDS

  • NAME FIELDS

  • EMAIL FIELDS

  • PHONE FIELDS

  • SIDEBAR FIELDS

Refer RETURNING FieldSpec



RETURNING ***ObjectTypeName*** 
[(FieldList [WHERE conditionExpression] [USING Listview=listview name] [ORDER BY Clause] [LIMIT n] [OFFSET n])]
[, ObjectTypeName [(FieldList [WHERE conditionExpression] [ORDER BY Clause] [LIMIT n] [OFFSET n])]]


SOSL search is similar to Global Functionality which Salesforce provides and it doesn't search using ALL ROWS unlike SOQL.







share|improve this answer















share|improve this answer



share|improve this answer








edited Aug 6 at 8:18


























answered Aug 6 at 7:48









Santanu Boral

27.6k51847




27.6k51847











  • Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
    – iloveseven
    Aug 6 at 8:08










  • SOSL doesn't have that purpose
    – Santanu Boral
    Aug 6 at 8:10










  • refer my updated answer
    – Santanu Boral
    Aug 6 at 8:18
















  • Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
    – iloveseven
    Aug 6 at 8:08










  • SOSL doesn't have that purpose
    – Santanu Boral
    Aug 6 at 8:10










  • refer my updated answer
    – Santanu Boral
    Aug 6 at 8:18















Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
– iloveseven
Aug 6 at 8:08




Hm... Just got curious. Will SOSL look for the fields in recycle bin by default? In other words while in SOQL we are to specify ALL ROWS in SOSL we are getting the same behavior by default, isn`t it?
– iloveseven
Aug 6 at 8:08












SOSL doesn't have that purpose
– Santanu Boral
Aug 6 at 8:10




SOSL doesn't have that purpose
– Santanu Boral
Aug 6 at 8:10












refer my updated answer
– Santanu Boral
Aug 6 at 8:18




refer my updated answer
– Santanu Boral
Aug 6 at 8:18












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f227841%2fis-it-possible-to-use-all-rows-in-sosl-query%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What is the equation of a 3D cone with generalised tilt?

Color the edges and diagonals of a regular polygon

Relationship between determinant of matrix and determinant of adjoint?