function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bpchristensenbpchristensen 

Mass Update Anything (Windows version) 1.0.5 "Query Does not contain ID Field"

Hey, I'm sure this is due to a stupid mistake, but I can only get the tool to produce an error message stating "Query does not contain ID Field .  ID Field is needed to update record(s)...
 
No matter how I structure the query using the query builder, I can only produce this error.
 
Any idea what I'm doing wrong?
 
Thanks in advance
 
Never mind - just figured it out.  In case anyone else is having this problem. you MUST include ID in your select statement if trying to select from the Opportunity table. 


Message Edited by bpchristensen on 06-19-2008 02:39 PM
StonyStony

First time you use Mass Update Anything it can be a bit confusing.

Imagine you want to look at all your leads' phone numbers, so you click on Query Builder, and select Object = Lead and Field(s) = Phone, click Apply, and Execute it, only to get the frustrating message, "Query Does not contain ID Field". If this had run (which it won't), what you would have seen would be,

345-234-2123
234-234-3467
345-123-1234

Totally unhelpful, as you don't know who's phone number is who's. Let's look at our query for a second. It's written as

"Select Phone from Lead".

Let's change it to "Select Id, Name, Phone from Lead"   Go ahead and just type this in yourself, or copy and paste - you don't need the query builder to write a query. Also, don't forget the Id is Capital I followed by lowercase d.

Now, we see our results as

00R4009020325 Hunter S. Thompson 345-234-2123
00R4009020631 Tyler Durden 234-234-3467
00R4009020987 Fletch Fletcher 345-123-1234

You can just as easily use the query builder and, in the second column, select multiple fields by using Control Click for Windows, Command Click for OSX. If you have never done this before, click the first time normally on Id, and next, while holding down Control (or Command in OSX) click the others, such as Phone and Name.

 

Hope that helps! As of this writing, 11,516 views so far to this question, so I figure it's time to write an answer!