You need to sign in to do that
Don't have an account?
textual
SOQL returning no results and giving me an error
So I've got a query where I'm trying to see if a user did something within the past 15 minutes
The query asks if theres a record where created date is greater than now - 15 minutes, limit 1
It works fine when theres results, but when theres no results, the query doesnt work
I was hoping I could ask to see if the result object is null, but instead I receive an error
Do i need to make a list for this just to see if its empty?
Im only looking to see if one record exists, so using a list seems to be overkill
Yeah, just use the size method and test to see if it is greater than zero.
(the date part is pseudo-code).