Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Examples and how to

Salesforce EOT: Filter operators, their behavior and format in M-Files

Last updated on 23 July 2025 · 2 min read

Admin
M-Files for Salesforce

Overview

When you are using the Salesforce External Object Type connector, you may want to add a filter condition to only include or exclude certain objects (IncludeFilter and/or ExcludeFilder), and you may want that condition to have both the "AND" and "OR" operators.

This will not work.

Examples that will not work

Sample queries that one might try, that will not work can look like this:

  • status = 'active' AND type = 'draft'
  • status = 'active' OR status = 'in progress' AND type = 'draft' OR type = 'search'
  • (Status = 'In progress' OR Status = 'Compeleted') AND (Service_Order_Type__c = 'Prior_Art_Search_order' OR Service_Order_Type__c = 'Drafting_order')

Example that will work

This query (either for Include or Exclude Filter) will result in an AND logical operator combining the two fields, even though you do not write the operator:

  • status = 'active', type = 'draft'

Details

The query passed to the M-Files connector is not the final syntax that Salesforce expects and while the queries above, including the one with the parentheses, look correct, this syntax is not supported and will not get parsed and will not work.

The query in the M-Files Connector for Salesforce cannot have OR operators.

The query conditions must be comma-separated, and will resolve to AND operators.

You must not use the same field in both Exclude and Include Filter.

More Connector Behavior Details

The "Exclude Filter" is reversed and added to the "Include Filter", so it would look something like this:

WHERE <IncludeFilter> AND <Reversed ExcludeFilter>

For example, if you have this configuration

IncludeFilter : Type = 'wanted'

ExcludeFilter : Inactive = false

The resulting filter in the query actually sent to Salesforce will become:

WHERE Type = 'wanted' AND Inactive != false


For the request for deleted objects, the two filters are combined:

WHERE <IncludeFilter> AND <ExcludeFilter>

The resulting filter for deleted objects query would be similar to this, assuming the example configuration above:

WHERE Type = 'wanted' AND Inactive = false

NOTE: You must not use the same field in both Exclude and Include filters!
Doing so will result in a conflicting query either in the deleted, or in the existing objects query.

Still need help?