• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

Show all versions on dispform-Sharepoint 2007

I have a modified version of the helpdesk template.

I'd like the version info to display on the bottom of this page, to show the history of that support request.  I really just want to see one or two fields ideally, but I'll take what I can get.  What's the best way to do this?  I've looked at the versions.aspx for some hints, but that gets messy fast.  Thanks.
0
IntercareSupport
Asked:
IntercareSupport
1 Solution
 
ivan_vaguninCommented:
Hi!
First you should create a custom list form (http://www.spsamples.com/2011/05/custom-sharepoint-list-form.html)
or a custom field type to add your control to the display form. Then you need code to show item versions. The code is not too complicated - just something like this:

SPListItemVersionCollection versions = ServiceRequest.GetItem().Versions;
for (int i = versions.Count - 1; i >= 0; i--)
{
       TableRow row = CreateVersionRow(versions[ i ]);
        VersionRows.Controls.Add(row);
}

If you give more details on what you're trying to do, I'll provide you more samples. Hope that helps!
0
 
IntercareSupportAuthor Commented:
Thanks!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now