• Kristen Murray 6
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Developer
  • Stanford University Office of Development

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
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.)
I have been reading "Understanding Testing in Apex".  In the section entitled Understanding Test Data, there is a sentence that reads "If a test makes a Visualforce request, the executing test stays in the test context but runs in a different thread, so test data isolation is no longer enforced."  This is interesting and I would like to write a test class that illustrates this concept to share with my coworkers, but I am perplexed by the very first clause of the sentence:  "If a test makes a Visualforce request...".  How does one do this?
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.)
I have been reading "Understanding Testing in Apex".  In the section entitled Understanding Test Data, there is a sentence that reads "If a test makes a Visualforce request, the executing test stays in the test context but runs in a different thread, so test data isolation is no longer enforced."  This is interesting and I would like to write a test class that illustrates this concept to share with my coworkers, but I am perplexed by the very first clause of the sentence:  "If a test makes a Visualforce request...".  How does one do this?