Skip to content

Where clause referencing multiple fields #456

Answered by jamessimone
MikeRebkavets asked this question in Q&A
Discussion options

You must be logged in to vote

What is the API name of the Color field? Is it Color__c? RecordType is a special field within Salesforce but you don't use dot notation in SOQL to reference fields (with the exception of relationship fields).

If Type is also a standard field (eg it needs no __c notation for the API name), it's likely the correct where clause you're looking for is Type = 'Solid' AND Color__c = 'Green'.

Try out your query in the Dev Console - you're basically looking to use the exact syntax that comes after the WHERE keyword

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MikeRebkavets
Comment options

@jamessimone
Comment options

Answer selected by MikeRebkavets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants