How it works: Show Quoted Messages link in MOSS 2007 Discussion boards
If you ever wondered why would the “Show Quoted Messages” link disappear once you edited a reply, I have an answer for you.
The explanation can be found in the schema.xml at "c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\DiscussionsList\Discuss\schema.xml"
at the computed hidden field definition
<Field ID="{b0204f69-2253-43d2-99ad-c0df00031b66}" Name="CorrectBodyToShow"
<IfEqual>
<Expr1>
<Column Name="Created"/>
</Expr1>
<Expr2>
<Column Name="Modified"/>
</Expr2>
<Then>
<Switch>
<Expr>
<Field Name="IsRootPost"/>
</Expr>
<Case Value="TRUE"><HTML>Body</HTML>
</Case>
<Default>
<Switch>
<Expr>
<Column Name="TrimmedBody"/>
</Expr>
<Case Value=""><HTML>Body</HTML>
</Case>
<Default><HTML>TrimmedBody</HTML>
</Default>
</Switch>
</Default>
</Switch>
</Then>
<Else><HTML>Body</HTML>
</Else>
</IfEqual>
This means if the created and modified time was not equal then TrimmedBody returned for this value which will eventually cause the rendering to use that field value to be displayed with the link. Otherwise the field value Body is returned and the link is not displayed.
This means that if you have content approval required set on a discussion board and someone approves an item, the link will disappear.
This behavior was implemented with the following mindset, if you edit your reply, only the Body field will be updated, the TrimmedBody field will not be changed. That is only populated on reply creation. This means that the edited reply will only show up if the full Body field is displayed.
It is possible to override this behavior using a custom discussion board list definition, implementation details can be found here.
Comments
- Anonymous
February 17, 2009
As I mentioned in my previous post you can override the default behavior of the “Show Quoted Message”