Friday, February 26, 2016

Configuring Forms Based Authentication in SharePoint


Hi Guys,

I had a requirement in my project to allow external users to access our on-premise SharePoint site. It is difficult and need to follow many steps.

We need to implement Forms Based Authentication to allow external users access the site.
I've followed the below steps to achieve the functionality.

Steps:
1. Creating a Membership Database.

2. Add Users to the Membership Database.

3. Editing the Web.Config files

4. Configuring SharePoint.


For full explanation follow the below link

http://blogs.visigo.com/chriscoulson/configuring-forms-based-authentication-in-sharepoint-2013-part-1-creating-the-membership-database/

Wednesday, February 24, 2016

Create a page layout in SharePoint 2013 (News Page Layout)

Hi Folks,

I created News Page layout for my project. For that, I've followed the below steps to achieve the functionality.

Create a Page layout based on your site content type

1. Create Site Columns >> Add them to the group.
2. Create Site content type, Select “Page Layout Content Type” and “Article Page” as parent.
3. Add the new site columns to the Site Content Type.
4. Create a Page layout (Design Manager >> Edit Page Layout >>Create Page Layout >> Provide name and select your site Content Type).
5. Create Page in Pages Library >> Select the new page layout you’ve created.
6. Edit Properties of the page and provide values for the fields.
7. Check-in the page.
8. Open the page. You’ll get all the values.
9. Edit the page layout in designer according to your design

Tuesday, February 9, 2016

Make different type SharePoint fields as Read-Only

Hi folks,

Please see the below function which is meant to make different type of SharePoint fields as Read-Only.

function SetReadOnlycolumn(){

$("input[title='FieldName1']").attr("readonly","true"); ////Single-line of text field

$("select[title='FieldName2']").attr("disabled","disabled"); //Choice field

$("input[title='FieldName3'], textarea").attr("readonly","readonly"); //Multiple-lines of text field

$("#ctl00_ctl40_g_46606705_ff1e_460d_8675_2f9815d404c6_ff61_ctl00_ctl00_BooleanField").attr("disabled", "disabled"); // Yes/No field----Field4

$("input[title='FieldName5']").attr("readonly","true"); // Number field

}

Also, find the below syntax to block/disable the fields of type input(textbox,  checkbox), select(dropdown / choice field) and textarea (Multiple Lines of text) in one step



$('#DivId').find('input, textarea, select').attr('disabled','disabled');

DivId is the ID of the div tag.

Note: Don't use <div> tag within <table> or <tr><td> tags. In that case, please use <tbody> within <table> or <tr><td> tags.

Monday, February 8, 2016

PeoplePicker Field knowledge

Hi folks,

Hope..all are doing good. Let me explain you the issues I faced in retrieving the value of PeoplePicker fields.

It is Office 365 site. I was working in SharePoint list edit form and trying to fetch the values from different list based on primary key. Well, text and choice fields are cool and I didn't face issues in getting those. But when it comes to "Person or group" fields, they were hitting my head like anything. I googled many things and tried methods like 'get_lookupValue()' and 'get_lookupId' but all resulted into an error. Even the method 'get_email()' thrown an error of "undefined function".

Later, I checked the peoplepicker field settings. Please check the image below.

In Person or Group field settings, I've selected 'No' in "Allow multiple selections" and tested with the same functions stated above. It worked!!!!!!!!!!!!!!!!!!
As per the system, only 1 name is allowed in the PeoplePicker fields so I preferred to do so.

I'll research from my side in future and continue adding to this post on how to read peoplepicker field if "Allow multiple selections" is selected as 'Yes'

Thanks for reading.