Modify Revision History (revisionDialog.html) for specific ItemTypes

Hi, I need some help in building a custom Revision History for the ItemTypes "Part" and "Document". The standard revision history will display a set of standard properties (e.g. generation) and all non-hidden properties. We use a lot of hidden=0 properties in the ItemTypes Part and Document. Most of them are useful in the search grid but not of interest in the revision history. I want to disable most of these properties and add an additional property verion_comment instead. This property contains short information about the revision specific changes and is e.g. triggered by the Office connector. The revision history is created by the following codetree file: ../Client/scripts/revisionDialog.html The file contains an xpath query that defines what should be shown in the revision history. I plan to use a custom xpath string based on the ItemType.
// default xpath
var xpath = "Relationships/Item[@type=\"Property\" and (not(is_hidden) or is_hidden=0 or name=\"generation\" or name=\"major_rev\" or name=\"comments\")]|Relationships/Item[@type=\"xItemTypeAllowedProperty\"]/related_id/Item";

// custom code - overwrite xpath for specific ItemTypes
if (itemTypeName == "Part"){
xpath = "Relationships/Item[@type=\"Property\" and (name=\"generation\" or name=\"major_rev\" or name=\"comments\" or name=\"item_number\" or name=\"name\" or name=\"id\" or name=\"version_comment\")]|Relationships/Item[@type=\"xItemTypeAllowedProperty\"]/related_id/Item";
}
The basic idea works fine! My custom xpath is successfully used when open a Part revision history. Also adding the additional version_comment property works. But I cannot get rid of the non-hidden properties. Deleting the code used for the hidden properties crashes the revision history and I will not get no results any more (=empty table without columns). Any idea what could be missing in my xpath? Are there some required properties that I have to add? Using a TGV view for a custom revision history would work but is not an option right now. In SP11 the TGV view is slower than the standard revision history. The current TGV version also cannot use a custom orderBy property and will only sort accross the sort_order property (if there is one). But a revision history shall use the generation property for sorting. Thanks for any input! Angela
Parents Reply Children
No Data