Im having a big problem in Sharepoint 2010. Im already thinking its a bug in the product.
I need to search two Form Libraries, one in a site in English, and the other in a site in Portuguese, with the ListData.s开发者_Go百科vc REST service.
The problem lies when i try to filter the Form Library by the ContentType. In the english Library, it all goes well, but in the portuguese one, ContentType is spelled "TipoDeConteúdo", which I think is breaking it because of the special char.
Here are the urls
English: http://pc55861/_vti_bin/ListData.svc/Consultas?$filter=ContentType eq 'ConsultaJuridico' Portuguese: http://pc55861:81/_vti_bin/ListData.svc/Consultas?$filter=TipoDeConteúdo eq 'ConsultaJuridico'
I already tried to use "ContentType" instead of "TipoDeConteúdo", to no avail.
Anyone have any ideas?
I hope you've found the answer by now, but since this question doesn't have an answer, here it goes:
When you query a non-English site with the REST service you need to provide the display names of lists and fields, like this:
var url = "/_vti_bin/listdata.svc/Páginas?$filter=" + encodeURIComponent('TipoDeConteúdo') + " eq 'News Article'"
In the querystring portion of the url (filter, sort, etc) you need to URLencode all the special charecters like in the example above.
精彩评论