We have reports to search all cases that contain certain serial numbers (strings) in a custom text area field that can contain a comma-separated list of serial numbers. Additionally, serial numbers can be in a text field on a custom object related to case. Due to the maximum length of report filter arguments, we can just search for about 100 serial numbers in one run.
Now we have lists of thousands of serial numbers to search for. How can I do this? These ideas come to my mind:
- Can you search for a long list of arguments using data loader? I cannot use the SOQL = operater because the serial numbers are in comma-separated lists. Data loader doesn't allow to use SOSL, does it?
- I could build a visualforce page where a user can input the (long) list of serial numbers and a SOSL query is created. A SOSL query is limited to 20.000 characters, so this would allow to search for 1.000 to 2.000 serial numbers in one run. It could look something like this (ignoring the custom object):
FIND {1234567890 OR 1234567891 OR ...} RETURNING Case
Edit: The most elegant way for users to provide the list of serial numbers would be to upload an Excel or CSV file. But they could also just paste a comma-separated list ("12345,23456,6543,3456") into a long text area.
Maybe the Analytics API could help (available as a closed pilot since Summer '13 ), but I could not find any public information on that.