You need to sign in to do that
Don't have an account?

Apex custom controller
I"m trying to build a visualforce page, where I'd like a user to input information. When they hit submit, I'd like it to query the database to check if the record exists (based on values like FirstName or Lastname), and if not, create a new record. I can't seem to find a decent example online to help me work through this, does anyone have advice? Thanks, Alix
You could search for the different conditions using OR. Something like
All Answers
Try something like this, of course substituting for your object/fields.
Apex Class
Visualforce Page
Thanks! I think this is what I was looking for. What is the best way to handle multiple conditions in which I'd like to match a record?
For example:
Is there an efficient way without doing multiple SOQL queries? Thank you!
You could search for the different conditions using OR. Something like