Hot answers tagged

7

Part of the response for each list is the attribute BaseType which is a string representation of the numeric value from the enumeration SPBaseType for each list. BaseType="1" for DocumentLibrary


6

I stumbled upon this question but I was looking for Server Object model code. Below code helped me and maybe will help someone else too. if (objList.BaseType == SPBaseType.DocumentLibrary) { //Call function }


6

Why the code solutions? Use the native SP2010 document routing possibilities. Define an external Send to location on your source web app (in central admin), point it to the external site (web service url is something like http://destinationsiteurl/_vti_bin/OfficialFile.asmx), set the file action to either copy or move (depending on your needs). Then, in ...


4

As mentioned, you will need to use either Visual Studio for this workflow scenario, or implement a Event Receiver in the document library that will fire whenever item is added or updated. In both cases the program code would run after item has been added/updated and the context of the workflow/event receiver will contain the document in question (or at ...


3

& gets encoded to %26 becuase it is a reserved keyword that is used in query strings. This is intended behavior and it is the client (your code's) responsibility to decode it back. In JavaScript you can use the below decodeURIComponent('%26')


3

I have found similar question on the same requirements. Please check the below links: How to retrieve files inside folder in document library using javascript SharePoint: Get Files from folder using JavaScript client object model Also there is a very helpful article related to working with folders and files in SharePoint by Microsoft. Check the article ...


2

You can't use only JavaScript to do this. The CopyIntoItems method takes a byte[] stream parameter. This means you need to be able to read a file into a byte array and then pass this to the method. This first step isn't possible in JavaScript.


2

The best approach would be to create a content type that includes any information you need, like a description column. Apply this content type to your document library. Then when a new file is uploaded, users will be taken to the EditPage where this information can be entered. If a new item is created through the library new button, then the columns will ...


2

In SP2007 the best you can do is setting the queryOptions of the GetListItems to: <QueryOptions> <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns> </QueryOptions> But it'll remove the fields you listed, but only other required fields. In SP2010 you can set it to <QueryOptions> <IncludeMandatoryColumns>...


2

I think the issue is that the options you are adding to the select don't have the same ids as the values in the source list. You're using the Title for both the option text and the value. Assuming that the DropDownChoice is a Lookup column, you need to use the right id for each option to match what would be saved if you weren't running your script.


2

You can make a REST call like _vti_bin/Listdata.svc/YourList/$count and it should return the number of items in the list. http://mstecharchitect.blogspot.com/2010/01/accessing-sharepoint-2010-lists-using.html


2

Below proof of concept, create item and add attachment via client object model. var list = Context.Web.Lists.GetById(listId); Context.Load(list); Context.ExecuteQuery(); var item = list.AddItem(new ListItemCreationInformation()); item["Title"] = "New Item with attachment"; item.Update() context.ExecuteQuery(); var attInfo = new ...


2

The following example demonstrates how to authenticate SharePoint SOAP Services in SharePoint Online using SharePointOnlineCredentials class : public static CookieContainer GetAuthCookies(Uri webUri, string userName, string password) { var securePassword = new SecureString(); foreach (char c in password) { securePassword.AppendChar(c); } var ...


2

For the sharepoint groups you getting 401, try below. Navigate to the sharepoint group settings page and set the property " Who can view the membership of the group?" to "Everyone".


2

first point of call is to note the error that your getting. 404 means its sending back a not found exception. so now you know that the service is returning a message that it cant find somthing, the next step is to make sure that /_vti_bin/ListData.asmx actually exists? you can check by going to the site through the url in your browser! MY_SERVER/...


2

_.000 is used internally, if you open a site in Sharepoint Designer and look at a list, you'll see all those items referenced in that way. In almost all cases, we end up building the URL to where we want to go manually with various pieces of the response using things like ows_ID. For a list item, you need to view or edit, so you end up constructing a url ...


2

There is no option to retrieve deleted items (You can use Event Receiver and handle ItemDeleted Event, then some how notify the Synchronizer). The best workaround I can think of is to get the count of items. Find all new items and sync it Find modified items and sync it Get the item count from SharePoint - Compare it with the item count in Synchronizer. If ...


2

Probably you are looking for UserGroup.GetUserCollectionFromSite Method of UserGroup web service which Returns information about the collection of users for the current site collection. Endpoint url: http://site/_vti_bin/usergroup.asmx?op=GetUserCollectionFromSite How to invoke a SOAP request from a browser POST http://site/_vti_bin/usergroup.asmx ...


2

To access the SharePoint resources located in remote server you need to use the C# client object model. It is irrespective of version. You might need to understand the SharePoint 2010 client object model and try samples before start with the actual solution. SharePoint 2010 client object model SharePoint 2010 Client Object Model samples If you want to ...


2

Why not use JSOM to update the list in your code on your page. It is going to use list.asmx to perform the update. To update your list using JSOM, it should be as simple as this below: function updateListItem(itemId) { var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web().get_lists().getByTitle('My List'); this.oListItem ...


1

When I looked into this last year with Microsoft, I quickly came to the conclusion that the only legitimate way to link SharePoint Online Site collections was via Enterprise Search [which didn’t deliver the functionality we were after], as any bespoke solution would be short-term: Microsoft could collapse the link at any time via a platform upgrade. So we ...


1

There is no REST search service in 2010. Only listdata.svc for lists and ExcelRest.aspx for excel services.


1

I had a bit of a look into this my self because I wanted the use this to call the list.asmx web service and update the _ModerationStatus column using the UpdateListItems method. However there is not way to construct a SOAP call, and I've seen a number of articles talking about this issue and it seems that the 'Call HTTP Web Service' action is designed ...


1

This is not a soap based web service call. This is a HTTP RESTFul call. SOAP uses the PUT HTTP method


1

Finally, I found the answer. The problem is that if I upload file to Documents it requires a method Copy.CopyIntoItems and adding attachement is not possible.


1

After much clicking around in the SharePoint designer, I noticed the option marked Enable Attachments was unticked. Upon ticking this option I received and error stating the "attachments folder already exists" (and in fact the attachments feature worked as expected via the web interface). So on a hunch I made a backup of the Attachments folder on the ...


1

Check if any of your field has property "SPField.Filterable" set as false


1

Solution here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.webcontrols.searchboxex_properties.aspx This is what I have been hunting for all day, many links and suggestions but thanks goes to almostSharepointMaster because I found the PreQuerySuggestions on one of the links you provided, which led me to find ShowQuerySuggestions.


1

I dont know if you have looked at this yet? http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.query.query.getquerysuggestions.aspx and http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/fbdf2210-d7a7-4e0a-bf02-378e5da3d8da/ Hope this helps :)


1

The quotes from the article InfoPath: Use SharePoint Web Services : "Why won't InfoPath work with SharePoint Web Services? It comes down to the fact that InfoPath doesn't recognize that some web services, such as Lists.asmx's GetListItems requires strings (which InfoPath handles just fine) and XmlNodes (which InfoPath can't seem to figure out)" "The ...


Only top voted, non community-wiki answers of a minimum length are eligible