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
Kristen Murray 6Kristen Murray 6 

Lightning Connect and OData2

I set up an External Data Source of type Lightning Connect: OData 2.0, with a URL pointing to our Sybase OData server.  I am using Named Principal, Username/Password for authentication to the OData server.  The sync step worked fine, so I know the connection works in a basic case.  Next I established a relationship between a custom field of the standard Account Object and the id_number field of one of the external objects created by the sync step.  I am calling this external object Membership.  When I try to look at the Memberships belonging to an Account, I get the following error message (URL slightly obscured in this post)
The external system responded with an HTTP error "400 Bad Request".
The system tried to reach this URL: https://omitted.name.edu/odata/km_test_memb?$top=56&$filter=id_number+eq+'0009861717'&$inlinecount=allpages&$select=memb_number

Sure enough, if I point my browser to this URL, I see an error, but if I replace the + signs with %20, I get a good response in the browser.

My question is: Is there any way I can influence the URL that is generated so that it will use %20 instead of + ?  (If not, I will just go back to using a custom Apex adapter instead of OData2.  I thought OData2 would be simpler, but so far I've had more problems with it than with custom.)
md rafimd rafi
Hi Kristen , did you got your issue resolved? I'm having a similar kind of issue.  I would like to know if anyone used Database.InsertAsync OR Database.InsertImmediate to insert data on external objects?
Kristen Murray 10Kristen Murray 10
No, the issue was not resolved.
KIRAN KUMAR 568KIRAN KUMAR 568
Hi Kristen,

we are using ODATA url in my org and I able to  fecth the data but when I am facing an error when I save the data from salesforce.
Is the issue resolved, if not could you please share how you have connected to sybase server.