0

For example I am searching for a value of a0I1300002XwIQj. My SOSL returns 33 accounts, but I am trying to find what field on the account that the value is in. How would I go about that? Our org has a large amount of custom fields, person accounts, and pardot so selecting all fields from the data loader doesn't work.

FIND {a0I1300002XwIQj} Returning Account(ID, Name)
1

When performing an SOSL, you can specify what fields to look in, and what fields to return via the FieldList that way, you can help narrow down the fields you are searching in and also improve search performance.

Once you have your List of sObject(s) returned alongside the fields you specified, I don't see why you wouldn't be able to get the field names in which the value was found using Apex.

| improve this answer | |
  • How would I go about doing that in Apex? – Ian Cornish Feb 20 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.