Have you tried dragging the !=null condition to the top of the list? What does the console soql query show in that case?
I know you’re a champion, but sometimes it’s the simple things that get overlooked. Are logic conditions being used? They aren’t smart like within salesforce, so if you specify anything in them they have to be updated manually with any new conditions.
Hey, Matt. Conditions on Salesforce formula fields are supported. The two quick things to check that come to mind are Condition Grouping Logic and permissions. If the User running the page doesn’t have access to First_Complete_Interaction_Date__c, the field will get stripped out of the query. An quick check would be to add that field to model’s fields list and see if you get any data back. If you do get data back, you can use our model API to check to see if a particular field is “filterable” in Salesforce:
Replace “PatientCases” out with your actual model name, run that from the console, and if you get back true, then the field should be usable in a model Condition.
I put together a small sample of what I think you are trying to do and the model SOQL is correct. As Josh points out, possibly you have “grouping logic” specified that is resulting in skipping the conditions?
Aside from that, its difficult to say exactly what is going on. I tried with “process model client side” and “process client server side” and in both cases, SOQL is correct. I noticed that your second condition has a date of 2050. I thought possibly that was causing a problem but even with a condition of a date in 2050, the SOQL is correct.
Here’s my questions/suggestions:
Are you checking the SOQL immediately after the page loads (before doing anything) or later on after doing a few things? If you’re not checking it right away, try checking it immediately after page load before doing anything else on the page. The problem could lie in some other action you have firing that is corrupting the conditions in some way.
Can you use the sample below and try to recreate your situation using the standard Account objects? Narrowing down what might be causing the problem would be helpful for determining the root cause.
I agree with J’s point about permissions — Matt can you please confirm that the running user does / does not have access to the First_Complete_Interaction_Date__c field, and that it is filterable?
Why does the System Admin user not automatically have field-level permissions for all new fields? Every time I add a field I have to update the permission set?
Hey Matt - Glad you found the source of the issue. Regarding permissions, how are you adding the fields? If you are doing it through SFDC web interface, you should get a screen prompt for assigning permissions. If you are doing it through manually modifying XML, you need to manually add field permission to profile.
Are you using Schema Builder or the regular New Custom Field wizard? The wizard prompts you to select profiles to grant access to at the end, but not Permission Sets. I can’t remember what Schema Builder does in terms of FLS.