Using the picker control with a SalesForce SmartObject returns an error when setting the filter to a non-text property

  • 16 February 2021
  • 0 replies
  • 3 views

Userlevel 5
Badge +20
 

Using the picker control with a SalesForce SmartObject returns an error when setting the filter to a non-text property

KB003566

PRODUCT
K2 Cloud
K2 Five

 

When you use the picker control on a view and associate it with a SalesForce SmartObject, the control returns an error containing "LIKE" when you set the filter to use a non-text property like ID.

 

 

Symptoms

For example, after you set the filter for the picker control to use the ID property in SalesForce, you see an error like this when using the control: 
Error: [field]__c FROM [entity] WHERE (Id LIKE '%value%' OR Name LIKE '%value%') ^ ERROR at Row:1:Column:929 invalid operator on id field

Issue

The issue occurs because the Salesforce API does not support using 'like' with non-text fields such as ID. This is a known issue in the SalesForce APIs, see the following articles for more information:

Workaround

Behind the scenes, the way that the picker control builds up the filter statement results in a LIKE query, e.g.  WHERE ID LIKE '%value%'   If possible, adjust the filter used for the picker control to use a text property, instead of a non-text property.  

 

 


0 replies

Be the first to reply!

Reply