Tag: SharePoint

SharePoint Team Site Best Practices

Step-by-step Creating SharePoint Team Site

  1. Plan Overall Site Architecture
  2. Plan Site Collection Structure
  3. Plan on Web Parts that will make up the Team Site
    • Common Web Parts for Team Site
  4. Decide the Layout of the Team Site
    • Two columns w/ header
  5. Create the Team Site
  6. Configure the Web Parts
    • Create a “Compact View” for each Web Part
  7. Add the Web Parts to the Site
  8. Setup Security for the Site
    • Use Security Groups
  9. Setup Quick Launch Navigation
    • Never present the Site Contents link on the navigation menu
    • Remove “Recents”
  10. Create a Site Template
The best practice is to keep the SharePoint Site structure as flat as possible.
It is best practice to define all custom columns (metadata properties) at the very top site (Site Collection).
The best practice is to never break the inheritance of security from the site the web parts sit on.

Common Web Parts for Team Site

  • Document Library
    • Configure it w/ metadata, instead of folders
  • Calendar
    • Sync to Outlook
    • Color-code
  • Tasks
    • For Project Team
  • Contact List
  • Announcements
  • Links
    • *Promoted Links*
  • Discussion Board
  • Issue Tacking

 

Advanced Configuration

  • SharePoint Project Dashboard
  • Sync SharePoint Task List w/ MS Project
  • Project Risk Register in SharePoint
  • SharePoint External Sharing
  • Change Request Log in SharePoint
  • Calednar Color Coding
  • Calendar Sync w/ Outlook

 

See Also

 

 

Hide or Show Data Fields in SharePoint List Form

Sometimes, you may want to conditionally hide / show data fields in SharePoint List Form. SharePoint List Form supports XSLT, which can be used to control the data fields visibility.

Example:

Approval Request List
Approval Request List
  • My Approval Request list is used for two level approval.
  • Requester is responsible to select both 1st Approver & 2nd Approver
  • When submitting the request, requester cannot see the following data fields
    • 1st Approval Result
    • 1st Approval Comment
    • 2nd Approval Result
    • 2nd Approval Comment
    • Request Status
  • When 1st Approval, 1st Approver cannot see the following data fields
    • 2nd Approval Result
    • 2nd Approval Comment
  • When 2nd Approval, 2nd Approver can see all data fields

Procedure

1. Open the NewForm.aspx list form

2. Search the 1st Approval Result data field

3. Wrap the table row in a xsl:if block

<xsl:if test="false">
<tr>
  <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader">
      <nobr>1st Approval Result</nobr>
    </H3>
  </td>
  <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff5{$Pos}" ControlMode="New" FieldName="_x0031_st_x0020_Approval_x0020_R" __designer:bind="{ddwrt:DataBind('i',concat('ff5',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0031_st_x0020_Approval_x0020_R')}"/>
    <SharePoint:FieldDescription runat="server" id="ff5description{$Pos}" FieldName="_x0031_st_x0020_Approval_x0020_R" ControlMode="New"/>
  </td>
</tr>
</xsl:if>
<xsl:if test="false">
<tr>
  <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader">
      <nobr>1st Approval Comment</nobr>
    </H3>
  </td>
  <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="New" FieldName="_x0031_st_x0020_Approval_x0020_C" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0031_st_x0020_Approval_x0020_C')}"/>
    <SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="_x0031_st_x0020_Approval_x0020_C" ControlMode="New"/>
  </td>
</tr>
</xsl:if>

4. Repeat step 3 for 1st Approval Comment, 2nd Approval Result, 2nd Approval Comment and Request Status data fields

NewForm.aspx

NewForm.aspx

5. Open the EditForm.aspx list form

6. Search the 2nd Approval Result data field

7. Wrap the table row in a xsl:if block

<xsl:if test="@_x0031_st_x0020_Approval_x0020_R != ''">
<tr>
  <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader">
      <nobr>2nd Approval Result</nobr>
    </H3>
  </td>
  <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff8{$Pos}" ControlMode="Edit" FieldName="_x0032_nd_x0020_Approval_x0020_R" __designer:bind="{ddwrt:DataBind('u',concat('ff8',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0032_nd_x0020_Approval_x0020_R')}"/>
    <SharePoint:FieldDescription runat="server" id="ff8description{$Pos}" FieldName="_x0032_nd_x0020_Approval_x0020_R" ControlMode="Edit"/>
  </td>
</tr>
</xsl:if>
<xsl:if test="@_x0031_st_x0020_Approval_x0020_R != ''">
<tr>
  <td width="190px" valign="top" class="ms-formlabel">
    <H3 class="ms-standardheader">
      <nobr>2nd Approval Comment</nobr>
    </H3>
  </td>
  <td width="400px" valign="top" class="ms-formbody">
    <SharePoint:FormField runat="server" id="ff9{$Pos}" ControlMode="Edit" FieldName="_x0032_nd_x0020_Approval_x0020_C" __designer:bind="{ddwrt:DataBind('u',concat('ff9',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0032_nd_x0020_Approval_x0020_C')}"/>
    <SharePoint:FieldDescription runat="server" id="ff9description{$Pos}" FieldName="_x0032_nd_x0020_Approval_x0020_C" ControlMode="Edit"/>
  </td>
</tr>
</xsl:if>

8. Repeat step 7 for 2nd Approval Comment data fields

EditForm.aspx (1st Approval)
EditForm.aspx (1st Approval)
EditForm.aspx (2nd Approval)
EditForm.aspx (2nd Approval)

Using jQuery in SharePoint List Form

In my previous post, I showed you how to customize SharePoint List Form using SharePoint Designer.

It’s very common that we need to do the customization using JavaScript Library (e.g. jQuery, jQuery UI, etc.).

1. Download jQuery into a folder

2. Open SharePoint Designer

3. Open Site Assets, then click Import Files

Open Site Assets
Open Site Assets

4. Click Add Folder… to import the jquery folder

Import jQuery Folder
Import jQuery Folder

5. jquery Folder uploaded to Site Assets

jQuery in Site Assets
jQuery in Site Assets

6. Open SharePoint List Form, and enable Advanced Mode editing

7. Reference jQuery library and customization in the PlaceHolderAdditionalPageHead Content Control

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
    <SharePoint:DelegateControl runat="server" ControlId="FormCustomRedirectControl" AllowMultipleControls="true"/>
    <SharePoint:UIVersionedContent UIVersion="4" runat="server"><ContentTemplate>
        <SharePoint:CssRegistration Name="forms.css" runat="server"/>
    </ContentTemplate></SharePoint:UIVersionedContent>
    <script src="../../SiteAssets/jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            alert("You are running jQuery version: " + $.fn.jquery);
        });
    </script>
</asp:Content>

Customize SharePoint List Form using SharePoint Designer

Sometimes the out-of-the-box SharePoint List Form won’t fit your requirements. (e.g. Look & Feel, Cascading DropDownList, Validation, etc.)

In this case, we can customize the out-of-the-box List Form using SharePoint Designer.

1. Download & Install SharePoint Designer 2013 and its Service Pack

2. Open SharePoint Designer 2013

3. Open the SharePoint site

4. Open the SharePoint list

Open SharePoint List
Open SharePoint List

5. Create new SharePoint List Form

New SharePoint List Form
New SharePoint List Form

6. Input File Name (e.g. CustomNewForm.aspx), click OK

Create New List Form
Create New List Form

7. Open the new list form

8. Enable Advanced Mode editing to do the customization

Edit SharePoint List Form
Edit SharePoint List Form

SharePoint 2013 Best Practices Notes

After completed the MVA Course SharePoint 2013 Best Practices, I made the following notes and would like to share to whom it may concerned.


Best practices are patterns, implementations, and configurations that have repeatedly proven themselves as the best way to achieve a high quality and reliable solution.

1. Planning for SharePoint

Naming Convention
+ Consistency throughout entire farm
+ Use complete names, not abbreviations
+ Avoid spaces to limit population of %20

2. Capacity Planning

Four Fundamentals of Performance
a. Latency – Time b/w initiating action and last byte received
b. Throughput – Number of concurrent requests server can process
c. Data Scale – Content size and data corpus the server can host
d. Reliability – Ability of the system to meet the latency and throughput

+ Capacity management and sizing overview for SharePoint Server 2013

+ Technical diagrams for SharePoint 2013

3. Training – Key to Success

4. Installing SharePoint

5. Microsoft Updates

+ Critical On Demand (COD)
– a specific fix provided to a small number of customers affected by a critical problem
+ Public Update (PU)
– includes security fixes and fixes for problems that affect a broad number of customers
+ Cumulative Update (CU)
– includes fixes for problems reported through support cases
+ Service Pack (SP)
– Accumulation of CUs, PUs, earlier SPs, and may include new fixes and new functionality

+ SharePoint Updates

6. Optimization and Troubleshooting

+ Monitoring and maintaining SharePoint Server 2013

+ Manage search components in SharePoint Server 2013

+ Analyzing SharePoint Logs using ULS Viewer

+ Analyzing IIS Logs using Log Parser Studio

+ Claims authentication does not validate user

+ Community Best Practices for SharePoint 2013