Skip to content
+1-888-319-3663

HELP ARTICLE

Using Restrictions in the CRM Query Builder


The CRM query builder won’t allow you to do everything you can do in SQL, but you can get close.

Here are some of the common issues encountered when creating a CRM Query.

How do I say not equal to, ‘<>’ will not work?

This is correct, the CRM FetchXML won’t accept  <>. It will accept !=  so you will want your query to look like the one below.

Using multiple ‘Or’ statements are not being grouped correctly.

Here is a picture of the incorrect way to use multiple ‘Or’ statements.

This method won’t work, because the SQL statement will be put together as:

SELECT account.*, account.address1_shippingmethodcode,
  account.address1_addresstypecode
FROM account
WHERE (account.address1_shippingmethodcode = 1 AND
  account.address1_addresstypecode = ‘Primary’) OR
  (account.address1_shippingmethodcode = 2 AND account.address1_addresstypecode
  = ‘Secondary’)

Notice that the 1 is only with Primary, and the 2 is only with Secondary. I want the statement to look like this:

SELECT account.*, account.address1_shippingmethodcode,
  account.address1_addresstypecode
FROM account
WHERE (account.address1_shippingmethodcode = 1 OR
account.address1_shippingmethodcode = 2) AND
  (account.address1_addresstypecode = ‘Primary’ OR
account.address1_addresstypecode = ‘Secondary’)

Here is how you enter multiple ‘Or’ statements in the query builder.


If you are encountering something not listed here, email support@eonesolutions.com.

RECENT POSTS


Use the REST Connector to parse nested Value Arrays
SmartConnect email task fails with error: An invalid character was found in the email header
Does SmartConnect import into Avalara Avatax software
Could not initialize a collection when launching SmartConnect
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key when you open a SmartConnect map.

POPULAR POSTS


SSL Security error using OLEDB Connection
This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms
Removed Part: /xl/vbaProject.bin part. (Visual Basic for Applications (VBA))
The server process could not be started because the configured identity is incorrect.
Using WINSCP and a task to upload or download files from an SFTP site

CATEGORIES

TAGS

Business Central CRM D365 Business Central Dynamics 365 dynamics crm Dynamics GP Dynamics NAV Econnect Employee Spotlight eone eOne News error Error Message Events Excel Excel Report Builder Extender Flexicoder GP integration Map Meet the Team Microsoft dynamics crm Microsoft Dynamics GP Navigation List Builder Office Relationships partners Popdock release Reporting SalesForce SalesForce.com SmartConnect SmartConnect.com SmartConnect Bootcamp SmartConnect Maps SmartConnect Office Hours SmartList SmartList Builder SmartPost SmartView SQL Tech Tuesday Templates training

Integrate & Automate without Any Code.

SmartList Data has Never Been Faster.

The Easiest Way to Report on GP Data.