sharepoint-api

Will using a SPListItemCollection returned from a function reopen the SPWeb?

拈花ヽ惹草 提交于 2019-12-23 10:20:29
问题 After reading Stefan Gossner's post about disposing objects and this question about Cross method dispose patterns, I found that I was guilty of accidentally reopening some SPWebs. I know in Stefan Gossner's post he mentions you should dispose of an SPWeb after you are finished with any child object. However, the microsoft documentation mentions Caching the SPListItemCollection object. Is the following code correct? Would the returned SPListItemCollection reopen an SPWeb object? Is there any

Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

▼魔方 西西 提交于 2019-12-22 11:29:26
问题 We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the workflow manually immediately after it fails, the workflow runs fine. this.workflowProperties.Item["Client Name"] I've debugged the issue down to the above line

How to reference two versions of an API?

不羁岁月 提交于 2019-12-18 03:39:34
问题 I have a need to reference two different versions of the Sharepoint API dll. I have a webservice that needs to run under both Sharepoint 2 and Sharepoint 3, but also needs to work with new features provided by the Sharepoint 3 API (Checkout and Content Approval) What is the best way to acheive this - I'm currently leaning towards having two projects, with the code in a single file shared between the two with various sections of the code compiled in using conditional compilation. Is there a

Provide the 'allowthrottleablequeries' preference to allow this

此生再无相见时 提交于 2019-12-13 15:24:17
问题 I have developed an API using Microsoft Graph API. I am encountering below issue. URL that I am calling : /v1.0/sites/root/lists/cb32cc85-5351-423d-b2ec-bb418c1d9c64/items? $filter=fields/Created gt '2018-1-1T00:00:00' &expand=fields &$orderby=createdDateTime &$top=10 Error returned from the API : Field 'Created' 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

How to combine multiple nodes into one from a ATOM feed

眉间皱痕 提交于 2019-12-12 03:27:41
问题 theResult XDocument: <?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="http://mysharepointhomesite/_api/"> <id>ecfe572e-051e-4d49-899e-1c025wersfd7d</id> <title /> <updated>2017-03-20T14:13:12Z</updated> <entry m:etag="&quot;1&quot;">

Execute SharePoint Function On Page Load in AngularJS Application ($scope issue???)

我只是一个虾纸丫 提交于 2019-12-11 23:17:26
问题 I am using SharePoint's JavaScript Object Model in an AngularJS app and need one of its functions to execute on page load so an array is populated and used by an ng-repeat. Currently, it logs to the console the array push on page load, but does not appear to commit the values into the array for use on the page/$scope until I click in/then out of a input box, click OK on an alert box, or a dummy link that keeps me on the page. This is where I am confused as to why it can log the array properly

Authenticating Office 365 SharePoint Online OOTB services

假装没事ソ 提交于 2019-12-09 12:41:18
问题 I want to consume SharePoint data into a non .Net platform. I already use the SharePoint OOTB services like Lists.asmx, Webs.asmx and search.asmx for this purpose. I have successfully added support for forms based authentication using Authentication.asmx. Now, I want to provide support for Office 365 SharePoint online. For that purpose I have a demo SharePoint Online site that I am working on. Problem, I am facing is when I use Mode method of Authentication.asmx I get ‘Forms’ in response:

SharePoint List.getListItems WebService to return sub folder contents, recursively

不羁的心 提交于 2019-12-08 16:41:40
问题 I am calling the lists.asmx webservice from CXF. The following soap call does not return files from list sub folders. It returns folder1,folder2 and file1.pdf Shared Documents folder1 file2.docx file3.pdf folder2 sub-folder1 file5.pdf file4.pdf file1.pdf SOAP call POST /_vti_bin/lists.asmx HTTP/1.1 Accept-Encoding: gzip,deflate <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://schemas.microsoft.com/sharepoint/soap/"> <soap:Header/> <soap:Body> <soap1

Sharepoint REST API filter empty LookUp field

怎甘沉沦 提交于 2019-12-08 03:45:15
问题 I'd like to know how I can filter ListItems in SharePoint rest API (2013) on empty lookup. On my list items, there is a lookup (single value, not required) and i'd like to get all items where lookup is empty (blank). _api/web/lists/getbytitle('MyList')/items?$select=Id&$expand=MyLookUp/Id&$filter=?? Does someone has a clue ? Thx 回答1: REST API in SharePoint 2013 does Not support null values for filtering on list item queries . However you can combine CAML query with REST API to get the

Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

霸气de小男生 提交于 2019-12-06 09:19:57
We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the workflow manually immediately after it fails, the workflow runs fine. this.workflowProperties.Item["Client Name"] I've debugged the issue down to the above line where workflowProperties is of type Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties. The