0

I am trying to build an SPFx webpart for a list containing a V3Comments field, with append only comments set. As far as I understand REST and SP-PNP-JS doesn't support it.

I read that the SharePoint list web service supports GetVersionCollection. I thought I saw a sample showing how to use SharePoint list web service from SPFx. I used JSOM to retrieve Taxonomy Keywords and update a list item with keywords. I can find methods to get the version of an item as string, but not how to actually retrieve different versions of the item. I just need different versions of the V3Comments field.

How can I retrieve the versions in an SPFx webpart of the V3Comments field. Can JSOM do it, or how do I use the SharePoint list web service from SPFx?

Dennis Kuhn
  • 239
  • 3
  • 10

1 Answers1

1

This is not available with SPFx, JSOM at the moment. You can check if you can do it with CSOM update from August 2017.

Have a look at the CSOM August 2017 release https://dev.office.com/blogs/new-sharepoint-csom-version-released-for-Office-365-august-2017, especially those classes:

public property Microsoft.SharePoint.Client.ListItem.Versions
public class Microsoft.SharePoint.Client.ListItemVersion
public class Microsoft.SharePoint.Client.ListItemVersionCollection

I have not seen what is in these classes yet, if they do not work for you then you can assess the List Item Version Metatdata item from the _vti_bin/Lists.asmx service. More info here: http://blog.velingeorgiev.pro/how-get-list-item-field-versions-data-sharepoint-online. It is not ideal solution and would be great if the August update offers that, but it is the only alternative I found so far.

Velin Georgiev
  • 2,359
  • 1
  • 15
  • 21