SharePoint List Error - sharepoint-2007

I have 2 sharepoint lists on a site.
They have the same columns (defined from a datatype)
They contain the same type of data, but for a different product
They are accessed in the same way (CAML) under the same service account.
thing is today 1 of the lists cannot be queried any more (1pm today), it returns a Soap Exception.
The logs show nothing helpful nor does the eventlog
I have tried to reboot the server but the problem persists.
I have checked
The columns are still the same
The user account can still access both lists
The List ID (GUID) is correct
Example Query
<Query xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Where>
<Contains>
<FieldRef Name="Item_x0020_ID" />
<Value Type="Number">1</Value>
</Contains>
</Where>
</Query>
can any one help?

Found out the error.
User turned on indexing in the sharepoint list. This alter the way the SQL will be parsed. Causing a SQL error.
turned the index off and it worked!

Related

Microsoft GraphApi: how to filter SPO results

I have a SPO site within a SPO site collection.
My site has a DocumentLibrary and inside it 3 folders (Alfa, Beta and Gamma): I would like to get get the ID of one of them (for example Beta) by Graph API.
I can get all of them by writing:
https://graph.microsoft.com/v1.0/sites/[id site collection]/sites/[id site]/drives/
I can select a specific fields:
https://graph.microsoft.com/v1.0/sites/[id site collection]/sites/[id site]/drives?$select=name,id
but I can't filter the results, the following requests return always the same results of the first one:
https://graph.microsoft.com/v1.0/sites/[id site collection]/sites/[id site]/drives?$filter=name eq 'Beta'
https://graph.microsoft.com/v1.0/sites/[id site collection]/sites/[id site]/drives?filter=name eq 'Beta'
. Does anyone know why and explain me how to filter?
Thanks in advance.
As of now you cannot use ODATA query parameter $filter to filter the document libraries as it is documented that it can support only few query parameters. There is already a feature request raised in Microsoft Graph Feedback Forum, please upvote it so that the product team may develop it in future.
For now you should query it on your end(Client side) using list drives and pick the required drive object by the name property from drive objects listed.

Microsoft Graph HonorNonIndexedQueriesWarningMayFailRandomly Error when filtering SharePoint Online lists

I'm using ms-graph with SharePoint Online.
I've a simple list with a single title column and 3 items.
I use the following ms-graph call to filter items by title:
https://graph.microsoft.com/v1.0/sites/root:/lists/list-guid/items?expand=fields&filter=startswith(fields/Title,%27fig%27)
The result is an error message:
Field 'Title' cannot be referenced in filter or orderby as it is not indexed. Provide the 'Prefer: HonorNonIndexedQueriesWarningMayFailRandomly' header to allow this, but be warned that such queries may fail on large lists.
I know that this call was working before and also when I use SharePoint REST API then I can filter the list without any problems. I also tried different tenants.
Another fact is that the same call is working without the startswith filter.
Few days ago I had a different message for the same call.
"Field 'Title' cannot be referenced in filter or orderby as it is not indexed. Provide the 'allowthrottleablequeries' preference to allow this, but be warned that such queries may fail on large lists."
Regarding the following error:
Field 'Title' cannot be referenced in filter or orderby as it is not
indexed. Provide the 'Prefer:
HonorNonIndexedQueriesWarningMayFailRandomly' header to allow this,
but be warned that such queries may fail on large lists.
at least two options are available to surpass this error while filtering.
Option 1. Add an index to a SharePoint column
Once the index to a SharePoint column which participates in filtering is created, the error should no longer appear.
Option 2. Append header Prefer:HonorNonIndexedQueriesWarningMayFailRandomly
As the error message states append the specified header to request, for example in Graph Explorer:
Just checked the Graph API Explorer and found out that you can use allowthrottleablequeries rather than HonorNonIndexedQueriesWarningMayFailRandomly
Try to send your request with the following Request Header
Prefer: allowthrottleablequeries

Duplicate Customers Returned in Quickbooks CustomerQueryRq

We have an application that is synchronizing Quickbook's customers with a remote SQL Server database. And, I am running into a bizarre issue with the QBXML CustomerQueryRs. I am using an iterator with varying slice count and the response XML intermittently returns the exact same customer 2 or more times.
I have verified that the customer is exactly the same (i.e. FullName and ListID) are identical. I have even run the query with a MaxReturned value of 1500 which is greater than the number of customers in the company file. Some customers are returned as many as 5 times in the QBXML response.
Below, is a copy of my last request using the large MaxReturned value. My response is huge so, I will not include it. But, the same CustomerRet element is returned more than one time for about 133 customers out of around 1400. Any suggestions?
** QBXML REQUEST **
<?xml version="1.0"?><?qbxml version="12.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><CustomerQueryRq metaData="MetaDataAndResponseData" iterator="Start"><MaxReturned>1500</MaxReturned><ActiveStatus>ActiveOnly</ActiveStatus></CustomerQueryRq></QBXMLMsgsRq></QBXML>
You are probably getting back different notes or one of the other fields is changing.
Go to c:\ProgramData\Intuit\QuickBooks and edit the qbsdk.ini file.
If qbsdk.ini is not there, just create it.
Add or modify the following lines:
[Parser]
SdkAccelerator=N

OAuth Console Not Returning all fields for Honors and Awards

I'm new here, so please bear with me if I am posting to the wrong place.
When using the OAuth console, I am not able to retrieve all the fields under 'Honors & Awards' (URL: http://api.linkedin.com/v1/people/~/honor-awards). It appears I am only able to retrieve the id, name and issuer attributes.
<honors-awards total="2">
<honor-award>
<id>2</id>
<name>Test Honors</name>
<issuer>体育爱好者协会</issuer>
</honor-award>
<honor-award>
<id>3</id>
<name>Test Honors2</name>
<issuer>TS</issuer>
</honor-award>
</honors-awards>
Also, under the profile fields documentations, certifications appears to have 6 attributes in total, but when returning the XML when using http://api.linkedin.com/v1/people/~/certifications as the URL in the OAuth console, it only returns the following:
<certifications total="1">
<certification>
<id>4</id>
<name>Test Certification</name>
</certification>
</certifications>
Might there be something wrong that I am doing? Any comment would be greatly appreciated. Thanks!
I had the same problem. For some reason you have to specify fields for all the children of some collections. See examples of getting the syntax here:
How to Retrieve all possible information about a LinkedIn Account
If you use the JS API, it will be specified in the .fields such as:
.fields(["id", "firstName", "lastName", "certifications:(id,name,authority:(name),number,start-date,end-date)"])

How to Query Sales Order by Order Number?

I've gotten frustrated with the .NET DevKit and am now considering switching my app over to XML. But I'm still having trouble figuring out how to perform very basic queries.
How can I retrieve a QBD Sales Order by the order number? This is the "Sales Order Number" in the QBD UI, "RefNumber" in the SDK, and "DocNumber" in IPP.
Just in case somebody needs me to explain the use case for looking up a record by the human-readable unique ID: I'm integrating with a system where we don't have the luxury of storing a QB transaction ID after importing a sales order. So if that system wants to query QB later to check the status of a sales order, it needs to do so by that system's unique order #.
I already have links to all the documentation; thanks. I just need to know how to perform this query. Similarly, I need to do it for Invoices and POs.
I need the same thing for Items, the use case being that if we're importing items from another system, we need to query the QB item list by name to see if we already have that item in QB.
For ITEMS, you can use ItemConsolidated and a NameContains filter. For example, the XML would look something like:
POST https://services.intuit.com/sb/itemconsolidated/v2/<realmID>
...
<?xml version="1.0" encoding="UTF-8"?>
<ItemConsolidatedQuery xmlns="http://www.intuit.com/sb/cdm/v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 RestDataFilter.xsd ">
<NameContains>Your item name goes here</NameContains>
</ItemConsolidatedQuery>
It won't be perfect, because Intuit only supports "NameContains" (the item name contains the string you specify) rather than "NameEquals", but you can then loop through what you get back and filter it client-side from there.
For SALES ORDERS, unfortunately, Intuit Data Services doesn't support querying by DocNumber at this time.
Instead, a work-around for your situation might be to query for all sales orders, and then cache the Id and DocNumber value of each in your application. When you need to look something up, look up the Id in the cache, and then query by Id value. It's not pretty... but it's really the only way you can do what you're describing.

Resources