Posts

Showing posts from May, 2015

Add Sign in as Different User to SharePoint 2013

Image
This “Sign in as Different User” menu item is very useful when testing applications, but it can lead to problems especially when opening documents, say in Microsoft Word. So, it may be for these reasons that the option has been removed in SharePoint 2013.                                  Steps Locate the file \15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascx and open in a text editor. Add the following element before the existing element with the id of “ID_RequestAccess”: <SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"   Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"   Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"   MenuGroupId="100"   Sequence="100"   UseShortId="true"   /> Save the file.

Create folders and subfolders in Sharepoint 2013 Document Library - C#

Image
Create a single Folder private void CreateSingleFolder()         {             SPSecurity.RunWithElevatedPrivileges(delegate()                {                    using (SPSite site = new SPSite(SPContext.Current.Web.Url))                    {                        using (SPWeb web = site.OpenWeb())                        {                            try                            {                                SPDocumentLibrary documentLib = web....

SSRS IIF Conditions

Image
IIF Condition with two Field Values  Problem: Getting a string output according to the two DataFields Example : DataField 1            DataField2                   Output (IsComplete)         (IsApproved)     True                      True               =       "Completed"          False                      False              =       "Pending"     True                      False              =       "Rejected" Solution: Use the expression as: =iif((Fields!IsCompleted.Value = "True") AND (Fields!IsApproved.Value ...

Add / Update Tasks programmatically into the taskList in sharepoint - c#

Image
Add Task Method public bool AddTask(int ID, string RequestNumber, SPFieldUrlValue Link, SPFieldUserValueCollection AssignedTo) {  try             {                 SPSecurity.RunWithElevatedPrivileges(delegate()                {                    using (SPWeb oWebsite = SPContext.Current.Site.OpenWeb())                    {                        oWebsite.AllowUnsafeUpdates = true;                        SPListItemCollection SPLstItCol = spWeb.Lists[" YourTaskName "].Items;                          if (ID == 0)                 ...