Background: Get a project, request document management, of course, the document library is OK, but require that the document needs to be read, after reading, you can also comment, this moss seems to be a little difficult. and colleagues together, want to go there is no good way, and then think of the traditional development, two tables of the Cascade, it was thought of the document library and list library through a field cascade, nonsense said, to get to the point.
1, first, create a new document library, this is not nonsense; then, build a list library to save the comments on the document; At that time I was thinking, for a document what is the only, later thought, so simple, is not the ID, but also nonsense, hehe. All we have to do is cascade through the ID of the document in the document library.
2, open the document library Dispform page, we use this page to do the following, the next is to add the features we need, my arrangement is above the document content, and then the middle is a comment, the following is the frame to add comments, OK, two pieces of nonsense, to start our topic.
3, with the SPD open the Dispform page of the document library, which shows the contents of the document, this we do not have to tube, we want to add our content below. Add a row to the comment for this document, and then add a row to add a comment for future functions.
4, the middle of the comments, it is very simple, directly with the custom form, add our comments list, and then sit down to filter, the filter condition is the ID of the above URL, equal to our comments inside one of the columns used for cascading, so the comment came out.
5, then the following is the frame of the comment, still a custom form, but is a new one, add the columns we need, I only added the comment column, of course, we need to cascade the column, with the style of this line hidden away from us to use on it, after all, let customers see, this is not appropriate, nor beautiful. And then through the JS script, when the page is opened, the ID of this document to our comment on the hidden in this column, it can be, so we save the comments, we will bring the ID of the list, the above filter of course will be one more, our function is OK.
Screenshot of Effect: