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
John SaundersJohn Saunders 

Please Document the 15-character vs. 18-character Issue in the API Documentation!

I started working with sforce this past August. Somehow, I've managed to be ignorant of the concept of 15-character ids until today.

I just found out that I can't compare two ids for equality using "==" if one of them comes from a web link. I could never have imagined that this problem could ever exist.  I'm certain that no other developer who worked on this code has imagined it either. I'm actually going to have to check all the code looking for comparisons of ids!

But, I should never have had to imagine it. This should have been documented in the API document, which I read back in August.

Would you please document this in the manual???

Worse, I've got to go explain why my code broke, and nobody is going to believe me without documentation of this ("what do you _mean_ you can't compare two strings?")

P.S.Here's a hint: any time  you change something that you can't imagine will impact developers - document it anyway! This protects against failures of the imagination.

John SaundersJohn Saunders

And, while you're at it, could you document a regular expression which can validate a string as being a valid id? It would be nice to have a documented standard for that. I'm trying to avoid query string corruption here...