Tag Info

Hot answers tagged

3

You can use the Copy List Item action to copy a document from one library to another. I suggest you these useful links: SharePoint Designer Workflow: Copy a document from one library to another SharePoint Designer Workflow: Move a document from one library to another


3

Before modifying item, you should Disable event firing this.DisableEventFiring(); After finish updating you can Enable it using this.EnableEventFiring(); Identify if event is fired as part of Check-in if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null && properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null) ...


2

Evidently this error occurs in case if file has been modified while updating the file: listItem.Update(); ctx.ExecuteQuery(); How about this approach? public static File UploadFile(ClientContext ctx, string sourceFilePath, string targetUrl,IDictionary<string,string> fileProperties) { var targetFileUrl = String.Format("{0}/{1}", targetUrl, ...


2

I think you need to specify what type of CheckIn you're doing. Such as Item.File.CheckIn("Checked in programatically!", SPCheckinType.MajorCheckIn);


2

I haven't tried this. But I believe you need to deploy the sandbox solution to your site collection and activate it. Once this is done you can open the folder property and change the content type to Document Set. <- This will work for future folders but not existing ones. The workflow mentioned in the link bellow will do the trick. Also take a look at ...


2

@Nk SP has provided the correct references that would help you to copy documents from one library to another including PDF documents. But regarding the last statement that you mentioned in question - "The trigger will be a user ticking a tick box" would not be possible with SharePoint Designer Workflow. SharePoint Designer Workflow is triggered on 3 events: ...


1

Cody, as you said that you use documents in the library when you are online. So, you don't need to sync the documents. As you are aware the sync feature makes a local copy of the document on the user's machine(file system), which you don't need. So, you are good to go. Since, you are not syncing the documents then the limit of 20,000 documents is not even ...


1

Correct, if you only use documents online then there is no need to sync the library. And if you don't sync, then you can avoid the 20,000 item (files + folders) sync limit. In fact, you can have many hundreds of thousands of files + folders in your OneDrive for Business if you don't need to sync. The sync limit is confirmed here. Note that if you do need ...


1

There was not an issue with the code nor the Sharepoint edition. The issue was a somewhat scrambled list template, with multiple duplicate content types. I recreated it and everything is OK.


1

You can access this information via the MajorVersionLimit and MajorWithMinorVersionsLimit properties of the Microsoft.SharePoint.Client.List object. For example (managed OM): string url = "http://yoursite/subweb"; using (var clientContext = new ClientContext(url)) { var web = clientContext.Web; List list = web.Lists.GetByTitle("YourDocLib"); ...


1

I think you are looking for two storage places correct? Creating a new document library creates a new storage area. This second document library may then be added as a webpart.


1

SPListItemCollection is a collection of SPListItem. Get File object from SPListItem. Example: foreach (SPListItem item in items) { SPFile file = item.File; }


1

I assume you mean SharePoint 2013. In this case, of course, you can create lists, including document libraries via REST, as described here. For the document library you should use 101 as the BaseTemplate. url: http://site url/_api/web/lists method: POST body: { '__metadata': { 'type': 'SP.List' }, 'AllowContentTypes': true, 'BaseTemplate': 101, ...


1

How to create a Document library using SharePoint REST: url: http://site url/_api/web/lists method: POST body: { '__metadata': { 'type': 'SP.List' }, 'AllowContentTypes': true, 'BaseTemplate': 101, 'ContentTypesEnabled': true, 'Description': 'My Documents Library', 'Title': 'Documents' } Headers: Authorization: "Bearer " + accessToken ...


1

try below code: Add-PSSnapin Microsoft.SharePoint.PowerShell # Replace siteurl with actual web url $web = Get-SPWeb -Identity "siteurl" # Replace docurl with document library url $list = $web.GetList("docurl") function DeleteFiles { param($folderUrl) $folder = $web.GetFolder($folderUrl) foreach ($file in $folder.Files) { # Delete file by deleting ...


1

You can use just a small trick as mentioned below. Sample Code : foreach (SPListItem item in list.Items) { foreach (SPListItemVersion itemVersion in item.Versions) { if (item.File.Versions.GetVersionFromLabel(itemVersion.VersionLabel) != null) { ...


1

You can split the version label and check is the second part 0 string[] versionArray = itemVersion .VersionLabel.Split('.'); int minorVersion = Convert.ToInt32(versionArray[1]); if (minorVersion == 0) { //this is a major version } or you can check the reminder when dividing VersionId with 512 int modulo = itemVersion.VersionId % 512; if (modulo == 0) ...


1

You can use PowerShell scripting for this Sample code $spWeb = Get-SPWeb http://siteurl $spList = $spWeb.GetListFromUrl("/Lists/ListName/AllItems.aspx") $spField = $spList.Fields["Field Name"] $spField.DefaultValue = "1;#Term Name" #1 is term ID $spField.Update()


1

Ok.. success ! In case someone else is struggling here is the script. General Works in MDS and non MDS mode if deployed as per script comments. An old method of hiding the column using jQuery is included but commented out (ie. the OnPostRender has been commented). I thought it might be useful to someone. I have not done extensive testing yet so mileage ...


1

Users may set alerts to the list with the setting to notify them on change of their documents. Alternatively use a list workflow. A list workflow requires no action from the user as it applies to all items in the list. It can be designed using Sharepoint designer 2010 in a few clicks. Example In SPD use the workflow action for mail to send an email. In ...


1

The Document Approval workflow routes a document to a group of people for approval. The approval stage can be serial or parallel meaning approvers can do review in serial order (one at a time) or in a parallel order (all at once). Document Approval Workflows are created using out of the box workflow "Approval - SharePoint 2010" or can also be created as a ...



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