in Spring'16 orgs SOQL query on OAuthToken object with 18 UserId in where clause does not return the result
Last updated 2017-04-14 ·Reference W-2694195 ·Reported By 3 users
In new Spring'16 Orgs SOQL query on OAuthToken object with 18 UserId in where clause does not return the result where as 15 digit User Id returns correct result
SELECT id, Appname, AccessToken, DeleteToken, RequestToken, UserId FROM OAuthToken where UserId='15-digit userId'
SELECT id, Appname, AccessToken, DeleteToken, RequestToken, UserId FROM OAuthToken where UserId='18-digit userId'
Both of the above queries work in 200.0 orgs.
1. Login to any 202 org
2. To create an entry in the oauthtoken table login to the org via S1. You could use other ways of generating this data.
3. Now back to aloha and login to workbench.
2. Run the following SOQL "SELECT id, Appname, AccessToken, DeleteToken, REquestToken, UserId FROM OAuthToken WHERE UserId = '<18CHARID>' ORDER BY LastUsedDate DESC LIMIT 1 "
Note: Before running change the UserId to your local org user id. It will give result as "Sorry, No records returned".
4. Now remove the last 3 digits from UserId and take UserId = <<enter your 15 digit id>>. It will show the record.
For now only workaround is to use a 15 digit User id in where clause.
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.