Is there any rule to find out the username of person who uploaded the first ver

Is there any rule to find out the username of person who uploaded the first version of document (person who uploaded a new document with new doc id) when there are more than 1 versions for that particular document? Any help regarding this is appreciated. Thanks in advance....

OriginalPostID-106311

OriginalPostID-106311

  Discussion posts and replies are publicly visible

Parents
  • The document(ri!id,"lastUserToModify") function will only tell you the last person who uploaded a new version of the document but there's no option to retrieve the original version's creator.

    You can easily create a custom function that will take the version number and the document ID and return the creator (where -1 would be the current version and 1 the original version)

    public String getVersionCreator(ServiceContext sc, ContentService cs, @Parameter(required=true) Long id, @Parameter(required=true) Long version ) {

    Content content = cs.getVersion(id, version);
    return content.getCreator();

    }
Reply
  • The document(ri!id,"lastUserToModify") function will only tell you the last person who uploaded a new version of the document but there's no option to retrieve the original version's creator.

    You can easily create a custom function that will take the version number and the document ID and return the creator (where -1 would be the current version and 1 the original version)

    public String getVersionCreator(ServiceContext sc, ContentService cs, @Parameter(required=true) Long id, @Parameter(required=true) Long version ) {

    Content content = cs.getVersion(id, version);
    return content.getCreator();

    }
Children
No Data