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
    17 hours ago
















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
    17 hours ago












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 17 hours ago









iloveseven

3757




3757











  • 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
    17 hours ago
















  • 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
    17 hours ago















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
17 hours ago




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
17 hours ago










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
    17 hours ago










  • 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
    16 hours ago


















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
    17 hours ago










  • SOSL doesn't have that purpose
    – Santanu Boral
    17 hours ago










  • refer my updated answer
    – Santanu Boral
    17 hours ago










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
    17 hours ago










  • 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
    16 hours ago















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
    17 hours ago










  • 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
    16 hours ago













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 17 hours ago


























answered 17 hours ago









Prem Anandh

1066




1066











  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    17 hours ago










  • 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
    16 hours ago

















  • Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
    – iloveseven
    17 hours ago










  • 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
    16 hours ago
















Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
– iloveseven
17 hours ago




Could you, please, provide a reference which tells that we can not use ALL ROWS with SOSL?
– iloveseven
17 hours ago












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
16 hours ago





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
16 hours ago













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
    17 hours ago










  • SOSL doesn't have that purpose
    – Santanu Boral
    17 hours ago










  • refer my updated answer
    – Santanu Boral
    17 hours ago














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
    17 hours ago










  • SOSL doesn't have that purpose
    – Santanu Boral
    17 hours ago










  • refer my updated answer
    – Santanu Boral
    17 hours ago












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 17 hours ago


























answered 17 hours ago









Santanu Boral

27.3k51847




27.3k51847











  • 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
    17 hours ago










  • SOSL doesn't have that purpose
    – Santanu Boral
    17 hours ago










  • refer my updated answer
    – Santanu Boral
    17 hours ago
















  • 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
    17 hours ago










  • SOSL doesn't have that purpose
    – Santanu Boral
    17 hours ago










  • refer my updated answer
    – Santanu Boral
    17 hours ago















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
17 hours ago




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
17 hours ago












SOSL doesn't have that purpose
– Santanu Boral
17 hours ago




SOSL doesn't have that purpose
– Santanu Boral
17 hours ago












refer my updated answer
– Santanu Boral
17 hours ago




refer my updated answer
– Santanu Boral
17 hours ago












 

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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?