I'm running into an issue with a client who doesn't like her multiple lines of text fields getting truncated on the version history page of a list. She has a field for comments and would like to see the entirety of a version's comments.

I've found that the page uses: itemcurr.GetTruncatedFieldValueAsHtml(field),Response.Output

I want to replace that line with: itemcurr.GetFieldValueAsHtml(field),Response.Output

So, here are my questions/concerns:

  1. Can I just make this simple change and have it propagate to all lists?
  2. I know it isn't supported to make modifications in this way but beyond possibly breaking my customization after a patch, is there any harm in this?
  3. Is there a better way to expand the truncated field without having to resort to custom pages, custom js and method overrides?



The "right" answer is in your point #2; don't do this as it is not supported.

To address your point #1, any change made to files in /_layouts/ is farm wide so all lists everywhere will pick up the change immediately.

If the client is really insisting on this then one option would be for you to copy the versions.aspx page to a custom folder under /_layouts/ and then use a URL Rewrite tool to map incoming requests from the original versions page to your custom page. This lets you modify the copy of the page without worrying about a patch changing the standard Microsoft page. This also gives you an extra degree of control because you can specify what site/web gets the changed page based on filters defined in the rewrite rule.

Bear in mind that the changes made by any Url Rewrite tool applies only to a single server so this option must be installed and maintained on all servers in all farms. Any changes would also have to be manually copied to every server in all farms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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