You need to sign in to do that
Don't have an account?
prakash_sfdc
Rule Engine via Apex (Advanced Filters)
Hi,
I want to create a visualforce page like Advanced filters in List View.
I will give the Rule Criteria like 1 OR (2 AND 3) and Apex should query the object accordingly. I have tried replacing the numbers with field names and generating a dynamic query but it's not helping.
Please help.
I want to create a visualforce page like Advanced filters in List View.
I will give the Rule Criteria like 1 OR (2 AND 3) and Apex should query the object accordingly. I have tried replacing the numbers with field names and generating a dynamic query but it's not helping.
Please help.
If you can post your code snippet and let know where you are stuck, I will be able to have a look and help.
Thanks,
Shashank
1 OR (2 AND 3)
Hence, query will become
SELECT Id FROM Contact WHERE Name = 'filter1' OR (Name='filter2 AND Name='filter3')
Now Name='filter2 AND Name='filter3' will never give any result. So how do I handle AND condition and the precedence of braces.
I hope it is clear now.