For one of the clients, we wanted to simplify the process of updating document properties on the document library with Requires Checkout enabled.
The process of checkout, then edit and again check in was little annoying for the end users. The solution developed was having Data view web-part with link button to edit form with check in button.
The first milestone: Get Checkout alert and open edit link
It was done using the js method STSNavigateWithCheckoutAlert. The syntax can be observed using IE developer tool. Please refer this link (Open document in Edit mode) for more insights on different js methods on document name context menu.
The second milestone was to check-in item on saving item in edit form. This was achieved by getting check in button as we get on document upload page with a small trick of having query string as &Mode=Upload. Please refer this link for checkin button on edit form
And the finally the javascript looks like
onclick="STSNavigateWithCheckoutAlert('http://mysite/mylist/Forms/EditForm.aspx?ID=' + {@ID} + '&Mode=Upload', 1,0, 'http://mysite/mylist/' + '{@FileLeafRef}', 'http://mysite’)"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment