Iam newbie to salesforce. Iam trying to write formula field for below filter:

Filtered By: not (1 or (2 AND 3 AND 4))
1. Price greater than "25,000"
2. SF greater than 20
3. PF Number not equal to 1
4. PF Number not equal to 100

How can i write SOQL query to get the above filtered records.

Iam getting stuck when writing formula/SOQL with this filter. Can any one help me.


See Condition Expression Syntax (WHERE Clause).

So (depending on the exact API names and data types of the fields) the where clause would be something close to:

select ...
from ...
where not (
    Price__c > 25000
    (Sf__c > 20 and PfNumber__c != 1 and PfNumber != 100)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.