3

Im making a sharepoint issue tracker with a comment section. I havent found a way where I can do an append only comment, so for every comment it will reflect in the version history popup or the latest comment only rather than be shown in the display form.

The intended result would be a discussion between the creator of the issue and the person assigned to the issue.

Is there any way to include the contents of the version history popup to the display form or something similar to an append only comment?

2 Answers 2

2

You can screen scrape it.

Here's an implementation using jQuery. 'TaskId' is the numeric ID of the list item:

 $("#taskCommentContainer").load(_spPageContextInfo.webAbsoluteUrl + "/Lists/Tasks/DispForm.aspx?ID=" + taskId + " #SPFieldNote:last()");

You'll need to fiddle with the parameters a bit to make it work for you. Here's the jQuery load() documentation.

2

Yes, I did similar using the below method.

Use jquery.SPServices-2014.02.min library

$().SPServices({
          operation: "GetVersionCollection",
          async: false,
          strlistID: "<List Name>",
          strlistItemID: <ID>,
          strFieldName: "<Field Name>",
          completefunc: function (xData, Status) {
            $(xData.responseText).find("Version").each(function(i) {


            //Code to perform action


            });  
            }
        });
1
  • Where would I put the code exactly? In a web part or sharepoint designer? Commented Jun 6, 2017 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.