Thursday, 19 March 2015

How to develop SharePoint Library functionality Programatically? Part -1

Many times we need to provide some of the library functionality like check in, edit document, view document etc. programatically. Here are the sample code how you can implement in your code.

For Modal Popup please visit below link:
Sharepoint Modal Popup

 1) Check In : 

you need to call the function shown below to provide SharePoint check-in functionality for particular Item  programatically :

<li>
<a onclick="return OpenDocsDialog('web url/_layouts/15/checkin.aspx?List=ListGUID &FileName= fileurl&IsDlg=1');">
Check In
</a>.
</li>


2) Version History :
you need to call the function shown below to provide SharePoint Version History for particular Item  programatically :

<li>
<a onclick="return OpenDocsDialog('web url/_layouts/15/Versions.aspx?List=ListGUID &ID=CurrentItemID &IsDlg=1');">
Version History
</a>.
</li>

3) Workflow History:

you need to call the function shown below to provide SharePoint Workflow History for particular Item programatically :

<li>
<a onclick="return OpenDocsDialog('web url/_layouts/15/Workflow.aspx?ID=CurrentItemID &List= ListGUID &IsDlg=1');">
Workflow History
</a>.
</li>

4) View Property :
you need to call the function shown below to provide SharePoint view property of particular Item programatically :

<li>
<a href="#" onclick="return OpenDocsDialog( 'List URL/Forms/DispForm.aspx?ID=<%# Eval("ID") %>&IsDlg=1');">
View Property
</a>
</li>

5) Edit Property :
you need to call the function shown below to provide SharePoint Edit property of particular Item programatically :
<li>

<a href="#" onclick="return OpenDocsDialog('List URL/Forms/EditForm.aspx?ID=<%# Eval("ID") %>&IsDlg=1');">
Edit Property
</a>
</li>

No comments:

Post a comment