Add-PSSnapin "Microsoft.SharePoint.PowerShell"### GLOBAL VARS, CHANGE HERE$listname = "Style Library" $url = "http://abcd:1234/sites/TestSite/"function approveContent ($w, $listName) { $list = $w.Lists |? {$_.Title -eq $listName} foreach ($item in $list.Items) { if(($item -ne $null) -and ($item.LockId -ne $null)) { $item.ReleaseLock($item.LockId) ...
Wednesday, 30 July 2014
sharepoint check in and publish folder using Powershell
Continue Reading...
Labels:
check In,
Powershell,
publish,
SharePoint
datetime picker in sharepoint c#
Design Code:-
<SharePoint:DateTimeControl ID="dtpstartDt" DateOnly="true" runat="server" IsRequiredField="true" CalendarImageUrl="/_layouts/images/calendar.gif" CssClassTextBox="itw-longDate" LocaleId="7177" ToolTip="Example: 2000-12-31" ...
Labels:
C#,
datetime picker,
SharePoint
Programmatically Check Current user in SharePoint Group using C#
public void CheckcurrentuserinGroup() { SPGroup grp = SPContext.Current.Web.SiteGroups["GroupName"]; if (grp != null) { ...
Labels:
C#,
programmatically,
SharePoint,
SharePoint Groups
get user profile properties programmatically using c#
public void getuserprofilesyncCustomattributesvalues(string MysitecollectionUrl)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite siteCollection = new SPSite(MysitecollectionUrl))
...
Labels:
C#,
programmatically,
SharePoint,
SharePoint 2013,
user profile
Programmatically Delete all Item in SharePoint List using c#
public static void DeleteAllItems(string list)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite spSite = new SPSite(SPContext.Current.Site.ID))
...
Labels:
C#,
programmatically,
SharePoint,
sharePoint 2010
Set default master page and welcome page in sharepoint 2013 using Event receiver
void ChangeMasterPage(SPWeb Web, string pstrMasterURL, string pstrCustomURL) { Web.MasterUrl = pstrMasterURL; Web.CustomMasterUrl = pstrCustomURL; Web.Update(); ...
Labels:
Event Receiver,
MasterPage,
SharePoint,
SharePoint 2013
Thursday, 13 March 2014
insert lookup field in sharepoint custom list using c#
SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite site = new SPSite(SPContext.Current.Site.ID)) { ...
get all lookup value from sharepoint customlist using c#
List<string> myCollection = new List<string>(); SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite site = new SPSite(SPContext.Current.Site.ID)) ...
Saturday, 1 March 2014
Check the current Login user in sharepoint Group using c#
SPSecurity.RunWithElevatedPrivileges(delegate() { SPWeb theSite = SPControl.GetContextWeb(Context); ...
Labels:
C#,
SharePoint,
SharePoint Groups
Convert multiline text to string in sharepoint using c#
The below code is convert the SharePoint customList multiLine text column to string using c#
String description = Convert.ToString(item["Description"]);
SPHttpUtility.ConvertSimpleHtmlToText(description, -1...
Labels:
C#,
SharePoint,
SPHttpUtility
Checkin-Publish folder in SharePoint using powershell
Add-PSSnapin "Microsoft.SharePoint.PowerShell"### GLOBAL VARS, CHANGE HERE$listname = "Style Library" $url = "http://Abcd:1111/sites/SampleSite/"function approveContent ($w, $listName) { $list = $w.Lists |? {$_.Title -eq $listName} foreach ($item in $list.Items) { if(($item -ne $null) -and ($item.LockId -ne $null)) { $item.ReleaseLock($item.LockId) ...
Labels:
Powershell,
SharePoint 2013
Subscribe to:
Posts (Atom)
Followers
Follow The Author
Designed By Templateism | Seo Blogger Templates