+ Start a Discussion
Binu 8Binu 8 

Line Item rest soql not working

Hi Team,

I have developed a rest form for oppertunity line items.But I didn;t get the line items in my java class.The status code is 400.
My query is "Select Id, Name from OpportunityLineItem".This is working in salesforce developer console.
And In case of Account or Opportunity the data is getting.Let me know what will be the problem?
Alexander TsitsuraAlexander Tsitsura
Hi Binu,

if you put query to url you need make urlencode.

Please change "Select Id, Name from OpportunityLineItem" on "Select+Id,+Name+from+OpportunityLineItem"

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you.