0

I'm confused on when do i really need to use IN ANY FIELDS and in ALL Fields . Can someone clear things out for me thank you!

1 Answer 1

1

Regarding IN ALL FIELDS, that's the default, so if you don't have an IN, it's assumed to be IN ALL FIELDS - which means you wouldn't have to specify it. This to me indicates you would only really explicitly include it in your SOSL if you wanted to have more clarity in your code (eg. if someone not fully familiar with SOSL reads your code, or if you go back to it after a while - there's no question as to what fields it's searching). Documentation here.

As for IN ANY, I'm not seeing reference to that in the documentation, and search results are turning up nothing, so I don't think that's valid SOSL - if you saw it somewhere, drop a link, I'd be interested to see.

6
  • sorry but I saw the IN any in a dump for my PD1 Certification. if its not valid then maybe there isnt really any IN any in SOSL. Thats why maybe there isnt anything cause I cant search it as well.
    – Snorlax
    Apr 21, 2021 at 15:04
  • @Tachzxc Yeah, there doesn't appear to be. Had a check of the SOQL documentation too and there's no IN ANY referenced there either. Apr 21, 2021 at 15:22
  • 1
    Thanks Victor this is such a great help !
    – Snorlax
    Apr 22, 2021 at 10:18
  • 1
    @Tachzxc You should never use exam dumps, for this reason (they're wrong) and because they are unethical. Please report all exam dumps to Trailhead support.
    – David Reed
    Apr 22, 2021 at 14:59
  • 1
    Sure thing - here's the link to open a Case specifically for credential protection, including dumps: certification.secure.force.com/CredentialProtection
    – David Reed
    Apr 22, 2021 at 15:13

Not the answer you're looking for? Browse other questions tagged .