With the Excel Connector (for Windows), this is easily done by running a query based on the ids. It's also super handy for updating those fields either individually or in groups.
But, as a Mac user, my options are limited. In fact, I don't know of another way to easily query a subset of records based on their id.
Now, this situation can probably be avoided most of the time. But, here's where I run into it: Sometimes, a user will send me an exported report or copied/pasted data and want updates to be done on the records. In that case, I might have to extract the ids from hyperlinked records first. (Here's how I do that.)
Another scenario I run into is extracting records with lookups, eg: opportunities. When I run the export with LexiLoader, any lookups (such as Account) pull in just the record ids. If I want to display the Name, I'm kind of stuck. (Although, as I'm typing this now, I realize that I can probably get around this by including the related field in my SOQL query. Doh. Oh well, I'll share my previous method just in case anyone else can benefit.)
Anyway, here's the method I used:
1. Grab your record ids that you'd like to query and update.
2. Use the record ids to build your SOQL query.
I demonstrated this technique - using a concatenated formula to build query criteria - in a short video here.
Drag the formula in your second row of data down. You'll get the combined concatenated criteria for your query.
The last row will have all the ids ready to be copied and pasted into your query.
Mine looked like this:
Mine looked like this:
'0017000000b1bFCAAY' OR ID= '0017000000b2Ca8AAE' OR ID= '0017000000cEUwnAAG' OR ID= '0017000000colvrAAA' OR ID= '0017000000eiRbPAAU' OR ID= '0017000000iewgvAAA' OR ID= '0017000000iVUjZAAW' OR ID= '0017000000mJWy1AAG' OR ID= '0017000000nXFZRAA4' OR ID= '0017000000pG0BdAAK' OR ID= '0017000000RAUMiAAP' OR ID= '0017000000SGWm9AAH' OR ID= '0017000000T1GmbAAF' OR ID= '0017000000T1O36AAF' OR ID= '0017000000T3mPxAAJ' OR ID= '0017000000T3TM4AAN' OR ID= '0017000000TEq8dAAD' OR ID= '0017000000TFRUmAAP' OR ID= '0017000000TpUqCAAV' OR ID= '0017000000TpVQGAA3' OR ID= '0017000000TVkxkAAD' OR ID= '0017000000TYg9tAAD' OR ID= '0017000000UeKKZAA3' OR ID= '0017000000UfnOFAAZ' OR ID= '0017000000UfXxrAAF' OR ID= '0017000000uMigaAAC' OR ID= '0017000000uMWgbAAG' OR ID= '0017000000uMWhQAAW' OR ID= '0017000000uMWhUAAW' OR ID= '0017000000uMWiDAAW' OR ID= '0017000000UuVBmAAN'
3. In LexiLoader, navigate to the Export wizard.
4. Choose your object, then click on 'Browse' to create your export file.
I have a list of Account ids, so I chose 'Account,'
5. Give the export file a name. Click 'Save.'
I usually try to be fairly descriptive so that I can easily identify the purpose of my export.
6. Click 'Next.'
7. Choose the fields to include.
8. Update the query formatting as necessary.
I needed to add 'WHERE id = ' so that I can proceed with the next step.
9. Paste the concatenated query criteria that you copied from your last row of formulas in step 2.
10. Click 'Finish.'
11. Choose 'Yes.'
12. After your export is complete, open the file that you named in step 5.
You'll see all of the records that you specified in your query criteria.
13. Update or use your data.
When I've used this method in the past, there have been two reasons - to update a segment of records or to use them in a vlookup based on id in my original spreadsheet.
If you want to update...
There are a few different ways to do your update, depending on your circumstances.
- In your original spreadsheet of just ids, create a new column for each field that you want to update. Pull each column that you need in with a vlookup. This is helpful if you've already done some editing on your original spreadsheet and don't want to lose it.
- Use your export spreadsheet to update data as needed. This is the best option if you haven't already made changes on your original spreadsheet.