function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swapna MistrySwapna Mistry 

External lookup No Longer Working with Winter 17 update

We have an external data source to our SQL database. We have multiple objects using external lookups. 

It looks like SF changed the syntax that is used for external lookups in Winter 17, which has caused serious impact to our business processes. Our DBA has informed us that Odata/Web API does not support using "starts with" on an ID field. ​

Does anyone know how to resolve this?


When we try to lookup a record we are getting an error: 
Couldn't Connect to External Object Data
The external system responded with an HTTP error "400 Bad Request".

Here is an example of the syntax being used: 
Couldn't Connect to External Object Data
The external system responded with an HTTP error "400 Bad Request". The system tried to reach this URL: https://app.e-brandid.com/wcfodata1/WcfDataService1.svc/master_shipment?$top=201&$filter=+startswith(ms_id,176646)+eq+true&$inlinecount=allpages&$select=bill_to_cust_id,ms_id,requested_ship_date,ship_to_cust_id 

The proper syntax that DOES work is: 
https://app.e-brandid.com/wcfodata1/WcfDataService1.svc/master_shipment?$top=201&$filter=ms_id eq 176646&$inlinecount=allpages&$select=bill_to_cust_id,ms_id,requested_ship_date,ship_to_cust_id
Gordon EngelGordon Engel
I'm looking for documentation about this change, but the workaround probably involves use "like" instead of "startswith".
Swapna MistrySwapna Mistry
Hi Gordon, 
     I've searched high and low for any documentation. I have yet to find anything.

The problem is, I dont have any way to define the syntax. All I can do is create the external lookup field. No where in there does it allow me to specify what syntax to use. (Or at least none that Ive found so far)

It was working fine before the Winter 17 update.
Gordon EngelGordon Engel
I would encourage you to open a case with Salesforce.  I think this is related to the change in W-3179828, but (1) I can't tell if this was documented in the release notes and (2) I can't verify that it is actually relevant to your use-case.

I will try to dig in later, but I have to go to a meeting now.
Swapna MistrySwapna Mistry
Hi Gordon, 
I have had a case open with Support for a week now. The support reps are clueless. That's why I decided to post here. Thank you for your response. I just searched for W-3179828 and found nothing via google. Should I be looking somewhere else?
Gordon EngelGordon Engel
I found your Salesforce Case and added a note to reference the Bug number I mentioned.  I gave it to you for reference so that you might be able to speed up the Support effort to validate whether there is a relationship between your issue and the change that was introduced by the Bug fix.

I contacted the development team that introduced that change into the Winter '17 release, and they will take a look.  I also gave them a link to your Support Case.  Please keep an open mind - I may be mistaken and the change I am talking about may not be at all related to your issue.
Swapna MistrySwapna Mistry
Hi Gordon, 
   Thank you so much for all your help on this. 

Pardon my ignorance, but I dont see any case comment from your on my case. Also, is there a way that I can review bug W-3179828? Just to see if its related?
Gordon EngelGordon Engel
I commented on our internal Chatter thread, which is not part of the Case notes so it isn't visible to you.

Unfortunately, the only way to share the Bug is to have someone validate that it's related to your issue and then repost it on our Known Issues site.  The actual Bug detail text is just a list of steps to reproduce the Bug, so I think it would be difficult for you to connect the two issues.  One purpose of the Known Issues site is to translate an internal detail (and reproducer) into a more descriptive text that anyone can read, search for, and understand.

If these issues are related, then you should feel free to ask your Support agent to create a Known Issue for the Bug.
Swapna MistrySwapna Mistry
Understood. Thank you so much.