You need to sign in to do that
Don't have an account?
ChrisMcL
single SOQL query result check for zero returned records?
Before I use the results in a SOQL single query. How do I check for if the query returned 0 rows? (The size() method is not available in queries where I only expect to get at most one record.
Eg.
Account citizen = [select Id, Name from Account where Name = 'Citizen' limit 1];
if (?citizen is not empty?) {
}
Eg.
Account citizen = [select Id, Name from Account where Name = 'Citizen' limit 1];
if (?citizen is not empty?) {
}
But what you can definitely do:
Message Edited by micwa on 06-26-2008 06:04 AM
Or does SalesForce not operate unless there is some basic, default rows in the Accounts, Contacts, etc tables?