Document Library Versioning

First off...great forum, it's saved me numerous times in the past. Search didn't help me out this time around.
I've been using the packaged app Document Library v0.92 on Apex 3.01.00.08. Recently I expanded usage of the doc lib to other users and noticed some strange behavior in the versioning functionality. Whenever a new version of an existing document is uploaded the user under "modified by" is overwritten for all previous versions. I cannot verify this ever worked. I downloaded the app again and reinstalled into a different schema with the same result. Anyone else notice this?
Thanks
Mike

Thank you for the feedback. I'm going to look at this more myself but what I ended up doing was modifying the report sql on page 5 to select the user from the created_by column in doclib_documents instead of the modified_by column. The created_by column gets updated with the user name of the modifying user...essentially this is what should be happening to the modified_by column. Is the created_by column supposed to store the user name that originally uploaded the document and the modified_by column store the user name that added a new version? At this point I'm trying to understand the need for both columns... In my deployment I don't think I need to know who the originator of the document is if that's the intended use for the created_by column. Still playing with it but I'll probably have to modify page 1 and 9 as well. Seem like it should work.... Any holes in my logic here?
Thanks again

Similar Messages

  • How to know whether file is modified or metadata from SharePoint Document Library version history

    I have uploaded a document in document library. I am writing code to retrieve the items from the library only if document is modified, not the metadata.
    So if for an item only metadata is modified then it should not come, if document is modified then it should come. I tried from version history but it doesnt work. Any idea?
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

    Each file has an associated SPListItem which contains the metadata. See if the SPFile.TimeLastModified reflects the file and not the metadata.
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfile.timelastmodified.aspx
    Dimitri Ayrapetov (MCSE: SharePoint)

  • SharePoint 2013 - getting an error while clicking on the ellipsis of a document in a Document Library

    I have a standard out-of-the-box Document Library. versioning/checkin/out is enabled. There are a few extra columns added to the library. There is this a weird random behavior when clicking on the ellipsis (...) button on a document. Sometimes it will display
    the context menu and sometimes it will give me this error:
    TypeError: Unable to get property 'FileLeafRef' of undefined or null referenceTypeError: Unable to get property 'ItemType' of undefined or null referenceTypeError: Unable to get property 'ID' of undefined or null reference
    Sometimes a refresh will fix it. Sometimes it won't. It's all pretty random.
    Anyone have this issue or have any ideas on how to solve it?

    Hi
    "TypeError: Unable to get property 'FileLeafRef' of undefined or null reference"
    You can find some alternatives here (none of which have I tried or am I recommending):
    http://alternativeto.net/software/hotspot-shield/
    I'd still suggest ensuring you are running the latest version and contacting the vendor
    "TypeError: Unable to get property 'ItemType' of undefined or null reference"
    please try to test the site using IE Compatibility View, compare the result.
    Also, try to reset IE , compare the result.
    Here is a similar posts for your reference:
    http://social.technet.microsoft.com/Forums/en-US/6efe0564-7df9-4812-b08b-a9d36e3c257b/typeerror?forum=w8itprogeneral
    TypeError: Unable to get property 'ID' of undefined or null reference
    http://community.microstrategy.com/t5/Web/TN204030-TypeError-Unable-to-get-property-id-of-undefined-or/ta-p/204030
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • OOTB approval worfklow not creating task when require checkout is set as Yes on the document library

    HI,
    I set the document library versioning to "require check-out" to yes.
    I set the workflow settings to create an approval workflow and "start the workflow when the item is created".
    I create a new document from the document template, save and check-in. The workflow task is not getting created, however the workflow is started.
    when i change the require check-out to "No" and create a new document as above, the workflow tasks are getting created.
    Can someone advise on what is the problem when versioning is enabled?? can anyone provide solution. thanks.

    Hi,
    According to your description, my understanding is that the task was not created after the approval workflow was running when setting the require check out to be yes.
    I tested the scenario in my environment, if I used the Office client application to create documents, then the task would not be created even when the workflow was running.
    There may be some reason that the creating task action is missed when the document is created using Office client application and the require check out is set to be yes.
    As a workaround, I recommend to install Office Web Apps and use Office Web Apps to create the documents when setting the require check out to be yes.
    The workflow will be starting before the documents is checked in, and it will create the task after the document is checked in.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Download older version of a file from SharePoint Document Library using CSOM and 404 error

    Hi,
    I am trying to download previous versions including Major and Minor versions of documents from SharePoint Online using CSOM. I get 404 error when I try to download the file. I found several posts on various discussion forums where people are getting same
    error but none of those have any solution/answer. Below is one of the threads and sample code I have tried that results in 404 error. If I use the link in browser directly, I am able to download the file. Also I am able to download the current version of file
    using CSOM without any problem, it is only the older versions that give me 404 in CSOM.
    http://qandasys.info/how-to-download-the-historical-file-version-content-using-csom/
    public int GetStreamFromFile(string docid, string lib, string fileurl, ClientContext clientContext, int iuserid, string Version, bool isCurrrent)
    if(!isCurrent)
    List LibraryName = clientContext.Web.Lists.GetByTitle(lib);
    clientContext.Load(LibraryName);
    clientContext.ExecuteQuery();
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml = "" + fileurl +
    Microsoft.SharePoint.Client.ListItemCollection collListItem = LibraryName.GetItems(camlQuery);
    clientContext.Load(collListItem, items => items.Include(item => item.Id, item => item["FileLeafRef"], item => item["LinkFilename"],
    item => item["FileRef"], item => item["File_x0020_Size"], item => item["DocIcon"], item => item.File.Versions));
    //clientContext.Load(collListItem);
    clientContext.ExecuteQuery();
    foreach (Microsoft.SharePoint.Client.ListItem oListItem in collListItem)
    //string fileurl1 = (string)oListItem["FileRef"];
    //string filename = (string)oListItem["LinkFilename"];
    foreach (FileVersion version in oListItem.File.Versions)
    if (Version == version.VersionLabel)
    //Added excutequery to get object one more time as per blog
    //http://social.technet.microsoft.com/Forums/de-DE/sharepointdevelopmentprevious/thread/88a05256-8694-4e40-863d-6c77512e079b
    clientContext.ExecuteQuery();
    FileInformation fileInformation = ClientOM.File.OpenBinaryDirect(clientContext,version.Url);
    bytesarr = ReadFully(fileInformation.Stream);
    Darwaish

    Hi,
    According to your description,
    I know you want to get older version of a file from SharePoint Document Library using Client Object Model.
    The following code snippet for your reference:
    public void GetVersions()
    ClientContext clientContext = new ClientContext(“http://SPSite”);
    Web site = clientContext.Web;
    clientContext.Load(site);
    clientContext.ExecuteQuery();
    File file = site.GetFileByServerRelativeUrl(“/Shared Documents/mydocument.doc”);
    clientContext.Load(file);
    clientContext.ExecuteQuery();
    ListItem currentItem = file.ListItemAllFields;
    clientContext.Load(currentItem);
    clientContext.ExecuteQuery();
    FileVersionCollection versions = file.Versions;
    clientContext.Load(versions);
    clientContext.ExecuteQuery();
    if (versions != null)
    foreach(FileVersion _version in versions)
    Console.WriteLine(“Version : {0}”,_version.VersionLabel);
    More information:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.file.versions.aspx
    Best Regards,
    Dennis Guo

  • Versioning in Fileserver using sharepoint 2013 Document Library

    Hi,
    I am storing the Documents in C:\Documents folder and storing the Path to the Document Library using Linktoodcument. Now 
    My requirement is 
    1. How to maintain the versioning in the Folder where i am storing the Documents.You cannot store the two document in the same name in the Folder. How to do that 
    2. Two Clients are updating Documents with the same name then latest will Go and place in the two records.Previous document is over written by latest one. How to overcome this.
    Please advice me how to proceed on this.
    Thank you,
    KK

    Take a look at AvePoint's File Share Connector - http://www.avepoint.com/assets/pdf/technical_overview/DocAve_Connector_Technical_Overview.pdf.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Sharepoint 2013 Document library view show version history

    Hello everyone,
    I have a document library view with many folders. Each folder is a procedure and have document attached to it.
    When I add a new version, I would like to show version history for each document contained in the folder. For example:
    There is a folder Procedure 123 which has three files ( File1, File2, and File3). After a week the user the user created new revisions for each document.
    I would like to have a document view with the following information
    File Name   version
    ======  ======
    File 01         0
    File 02         0
    File 03         0
    File 01         1
    File 02         1
    File 03         1
    File 01         2
    File 02         2
    File 03         2
    Thanks for your help.
    Jhonny Marcelo

    This is quite simple, you have to modify the current view (Modify this view) of document library and then you can select version column from available column list (make sure version is enabled). please check below picture for detail.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • Issue related to "Document Set Version History" option for Video uploaded in Asset library

    Hi,
    When user clicks on ‘Document Set Version History’ option from context menu (ellipsis) of a particular video, ‘Sorry, something went wrong’ message is shown. The error message also says,
    versions are currently disabled for this document library.
    When we enabled version history for the video library, the functionality started working as expected.
    Ideally the context menu of video should not show ‘Document Set Version History’ option. But we are not sure why it is showing that option.
    Can anybody please explain, is it bug in sharepoint ? or any other approach we have to use.

    Hi Sanket,
    We need to configure the send to connections for the corresponding web application in Central Administration and then the locations will be available when clicking the Send To Other Location.
    Please go to Central Administration > General Application Settings > Configure send to connections.
    After configuring the send to connections for the web application where you need to use the Send To Other Location, the location will be available.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Version History for a Document Library - Can't view version history for only 1 item

    It is a Document Library with around 8 items. Each of the items have around 60-178 versions.
    I checked programmatically that this particular item had 63 versions.
    I am getting the foll. error when I try to view the version history for that 1 particular item.. it works for all other items in the same list.
    Unable to complete this operation.  Please contact your administrator.   at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileVersions(String bstrWebUrl, String bstrFileUrl, Object& pvarVersions, UInt32& pdwcVersions)
       at Microsoft.SharePoint.Library.SPRequest.GetFileVersions(String bstrWebUrl, String bstrFileUrl, Object& pvarVersions, UInt32& pdwcVersions)
    This is what I tried so far..
    I tried programmatically deleting few verisons for this item - no luck.
    I ended up deleting all the versions for this item - still I get the same error.
    I tried editing other items to see if their version history still works after new versions get added and it worked.
    This is despite the fact that other items that are working have number of versions  as 178, 130, 63 and so on.
    I appreciate any help.
    Thanks.

    Mike, 
     I don't think it is a programming question. It's a sharepoint browsing question.
    I have a document library with Versioning set to Create major versions.
    In that document library, I have around 8 documents, each of which has versions. Only for 1 particular document, when I try to see the versions by clicking 'Version History', I get the error as stated above.
    For all other documents, Version history works.
    My initial thought was that may be the document in question had too many versions and that's why it's failing but I was able to check that the document (in question) had 63 versions while there are still other documents in the same list which has 178 versions and 'Version History' is still working.
    I further explained all my efforts done so far in order to resolve this issue (none of which worked.)
    I deleted all versions (I couldn't delete it from IE since I can't even get to the page where it says 'Delete All Versions' - thus I wrote a small program to delete all versions for this document.)
    I also tried modifying other documents to see if a version history is being created for other documents and that is happening.
    Thanking you in anticipation..

  • View the versions of document from share point document library using code.

    HI
    i want to develop a web application (asp.net) from
    1) users will browse and view documents saved in document library by passing a documents DocumentID as parameter 
    to  sharepoint 2010 web application.
    2)also that  document has versions and how users  will view required versions, if user  will upload document to document library
    it will create new version and if user will same document with same name it over-right as new version.
    and how user will view the old version 
    adil

    Replay:
    From your description, my understanding is that you want to develop a web application to view document history versions of SharePoint 2010.
    You could accomplish your requirement by using Client Object Model, please refer to this article:
    https://msdn.microsoft.com/en-us/library/office/ee857094(v=office.14).aspx.
    You could refer to this code below:
    namespace clientOM
    class Program
    static void Main(string[] args)
    ClientContext clientContext = new ClientContext("siteUrl");
    Web site = clientContext.Web;
    clientContext.Load(site);
    List list = site.Lists.GetByTitle("Documents");
    clientContext.Load(list);
    clientContext.ExecuteQuery();
    CamlQuery query = new CamlQuery();
    query.ViewXml = "<View/>";
    ListItemCollection allContacts = list.GetItems(query);
    clientContext.Load(allContacts);
    clientContext.ExecuteQuery();
    FileCollection allFile = list.RootFolder.Files;
    clientContext.Load(allFile);
    clientContext.ExecuteQuery();
    foreach (File file in allFile)
    string version = file.UIVersionLabel;
    FileVersionCollection versions = file.Versions;
    clientContext.Load(versions);
    clientContext.ExecuteQuery();
    foreach (FileVersion hisVersion in versions)
    string hisversion = hisVersion.VersionLabel;
    Best Regards
    Vincent Han
    TechNet Community Support

  • Compare and differentiate the contents in between versions - Document Library

    I want to compare the version updates and  the content of a document which stored in document library using document version.
    For example: one word document has 3 versions, 
    Version 1.0 contents : Please
    Version 2.0 contents : Please Help
    Version 3.0 contents : Please Help Me
    Now, either the difference of these version should be highlighted like Version 2.0 in Help, Version 3.0 as Help Me.
    Need to generate a report of comparison between the document and display the difference in contents.
    Thank you

    Hi Karthik,
    use the following:
    http://blogs.msdn.com/b/ericwhite/archive/2008/06/14/openxmldiff-exe-a-utility-to-find-the-differences-between-two-open-xml-documents.aspx
    or this
    http://groupdocs.com/blog/groupdocs-comparison-for-net-c-sharp-diff-library-for-comparing-text-files
    or this
    http://msdn.microsoft.com/en-US/library/microsoft.office.tools.word.document.compare(v=VS.80).aspx
    private void DocumentCompare()
    object compareTarget = Word.WdCompareTarget.wdCompareTargetNew;
    object addToRecentFiles = false;
    this.Compare("C:\\Docs\\Sales1.doc", ref missing, ref compareTarget,
    ref missing, ref missing, ref addToRecentFiles, ref missing,
    ref missing);
    Kind Regards,
    John Naguib
    Technical Consultant/Architect
    MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation
    Please remember to mark your question as answered if this solves your problem

  • How to Find When A Document Library's Versioning Was Turned Off

    We have a document library that used to have versioning on. It's since been turned off. How do we figure out when versioning was turned off and who did it? 

    whenever you upload a document in a document library, it published automatically if versioning is not enabled. Also you can check versioning details of the document which always say No version found.
    You can verify version from library settings, and also can enable or disable versioning from the document library.
    Document Library-->settings-->General settings--> Versioning Settings.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • Unable to load Packaged App Document Library 0.91 in Apex 3

    I have downloaded packaged application Document Library 0.91 from packaged applications URL and trying to import it into APEX 3.0.
    In Application Builder I am getting an error message that 'Script has exceeded the maximum limit'. So I tried executing the install script as a application parsing schema, then it returned following error in SQL*Plus:
    SQL> spool doclib_install.log
    SQL> @doc_library_installer_0.91.sql
    APPLICATION 12487 - Document Library 0.9
    Set Credentials...
    Illegal security group id value for this schema.
    Check Compatibility...
    API Last Extended:20070108
    Your Current Version:20070108
    This import is compatible with version: 20060224
    COMPATIBLE (You should be able to run this import without issues.)
    Set Application ID...
    begin
    ERROR at line 1:
    ORA-20001: Package variable g_security_group_id must be set.
    ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 45
    ORA-06512: at "FLOWS_030000.WWV_FLOW_API", line 237
    ORA-06512: at line 4
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.2 - Production
    With the Partitioning, OLAP and Data Mining options
    Am i missing anything or if anybody got a luck to install this app into Apex 3.0 pls. let me know how to resolve the above error?
    Thanks & regards,
    Preet

    Preet,
    Maybe we need to be more explicit in the readme. You need to "Import and install the doc_library_installer_0.91.sql ... Select to install supporting objects." This is from the Application Builder, select Import. Maybe you uploaded it as a script under the SQL Workshop? Those directions are in the readme for upgrading from the .9 version to the .91 version without losing your data.
    -- Sharon

  • Authentication prompt issue when opening an office file in a document library with read permission for domain users

    An user as part of the domain users tries to open an office file from a document library but he got an authentication prompt asking him to authenticate. Domain users has only access to this library and not to the whole site. This uses to work in SharePoint
    2007 without any problem but not in SharePoint 2013, we didn't have a workflow on SP2007.
    Domain users has read access to only this document library in the site, but he shouldn't get an authentication prompt since he is part of the domain users and he is not trying to modify the document, he can open the document but gets two prompts, he can't
    also see the list using explorer view since nothings appears using the explorer view.
    Now, when opening the file, we can see..Updating Workflow Status, but we don't have any workflow working on this site or library, event any feature related to workflow.
    If we go to the event viewer in the server, we find this information,
    I also checked this thread but I couldn't find this scenario.
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/91bc770b-bb70-4885-a4ad-a243edb88753/event-id-8026-workflow-soap-getworkflowdataforitem-failed-doc-library-no-workflow?forum=sharepointgeneralprevious
    I also created another list with the same permissions and using other office files but got the same behavior.
    Now, we have migrated this site from SP2007 to SP2013.
    Any ideas?

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • Create a new document in Sharepoint Document Library/OneDrive on iPad/Safari

    Hi,
    My users are having trouble creating a new document from OneDrive in Safari on their iPads. The screen goes grey like its going to show the popup to select the new file type, but the popup never comes up. If they clear their cache, it works for exactly 1
    time and then goes back to this behavior. I'm not exactly sure if it worked before and/or when it stopped working. The iPad I have tested was at the latest 8.2 version of IOS and my Sharepoint farm is an On-Prem install of 2013 with SP1 mark2. My WAC farm
    is also 2013 SP1.
    Any suggestions?
    Thanks,
    Matt

    Hi,
    I understand you are suffering the issue when create a document in Sharepoint Document Library/OneDrive on  iPad.
    According to the official article
    https://technet.microsoft.com/en-us/library/fp161353.aspx?f=255&MSPPError=-2147217396, the version of your iOS should be in the supported list. I guess the issue may start after you installed an update, and if there is any other version (low versions)
    of iPads in your company, please use a different version device to test the issue.
    Meanwhile, to determine whether the issue is related to your SharePoint environment, I suggest you just to register an Office 365 trail account, and test the issue with SharePoint Online. In case the same issue happens with SharePoint Online, the issue should
    be related to your client device, and my next suggestion is to contact support of your device manufacture.
    Once you need any help from SharePoint end, please don’t hesitate to come back, and we are always happy to support you.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for