Tuesday, April 23, 2013
Wednesday, March 20, 2013
SharePoint Licensing - Client Access License (CALs)
Types of CALs:
·
User CAL
·
Device CAL
User CAL:
With the User CAL, you purchase
a CAL for every user who accesses the server to use services such as file
storage or printing, regardless of the number of devices they use for that
access. Purchasing a User CAL might make more sense if your company employees
need to have roaming access to the corporate network using multiple devices, or
from unknown devices, or simply have more devices than users in your
organization. You can go for User CAL if number of User is less than number of
devices.

Device CAL:
With a Device CAL, you purchase
a CAL for every device that accesses your server, regardless of the number of
users who use that device to access the server. Device CALs may make more
economic and administrative sense if your company has workers who share
devices, for example, on different work shifts.
A SharePoint Server device CAL authorizes one
computer to access SharePoint Server, regardless of the number of users (for
example, a shared workstation).
SharePoint Server User CALs are also available. A user CAL authorizes a user to access SharePoint Server from any device (for example, when an employee accesses the server from a computer at work and another at home).
SharePoint Server User CALs are also available. A user CAL authorizes a user to access SharePoint Server from any device (for example, when an employee accesses the server from a computer at work and another at home).

External Connectors
If you want external
users—such as business partners, external contractors, or customers—to be able
to access your network, you have two licensing options:
·
Acquire CALs for each of your external users.
·
Acquire External Connector (EC) licenses for each
server that will be accessed by your external users.
For SharePoint, Acquire
External Connector (EC) licenses would be the right choice.

Specialty Server Licensing
Specialty Server licensing is a commonly used model. Specialty
Servers are server-only licenses that also do not require CALs. Specialty
Servers require a server license for each instance of the server software
running on a server. An example of this is Microsoft Office SharePoint Server
for Internet Sites. You can run the instance in a physical or virtual operating
system environment. By exception, some products provide more specific use
rights.

Source: http://www.microsoft.com/licensing/about-licensing/client-access-license.aspx
You can get more details from Microsoft Support as well, refer to the following URL
Chat with Microsoft Volume licensing support team
Thursday, February 28, 2013
Sync list with user group using jquery
Requirement: To get all the user names from the SharePoint group "Deliverable Owners" and sync with a custom list called "Team Members" in a button click.
Solution: This is done using jquery and SharePoint web services.
Code:
<script type="text/javascript" src="https://siteurl/Documents/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="https://siteurl/Documents/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#syncUsers").click(function() //'syncUsers' is the ID of button control added in the CEWP
{
var errorOccured = DeleteUsersFromTeamMembersList();
if(!errorOccured)
{
AddUsersToTeamMembersList();
}
});
});
// to delete the existing users from the custom list
function DeleteUsersFromTeamMembersList()
{
var errorOccured = false;
$().SPServices({
operation: "GetListItems",
async: false,
debug: true,
listName: "Team Members",
CAMLViewFields: "<ViewFields></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
$().SPServices({
operation: "UpdateListItems",
async: false,
debug: true,
batchCmd: "Delete",
listName: "Team Members",
ID: $(this).attr("ows_ID"),
completefunc: function (xData, Status) {
msgData = xData.responseText;
isError = msgData.indexOf("ErrorText");
if (isError > 0) {
// Error creating fields!
alert("Error deleted user names from Team Member list!");
errorOccured = true;
}
}
});
});
}
});
return errorOccured;
}
//add all the users from the sharepoint group to custom list.
function AddUsersToTeamMembersList()
{
var alreadyProcessed = false;
var userName ;
var iD;
var userID;
var errorOccured = false;
$().SPServices({
operation: "GetUserCollectionFromGroup",
groupName: "Deliverable Owners",
completefunc: function (xData, Status) {
$("#results").text(xData.responseXML.xml);
$(xData.responseXML).find("User").each(function () {
userName = $(this).attr("LoginName");
iD = $(this).attr("ID");
userID = iD +";#"+userName;
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "New",
listName: "Team Members",
valuepairs: [["User",userID ]],
completefunc: function(xData, Status)
{
msgData = xData.responseText;
isError = msgData.indexOf("ErrorText");
if (isError > 0) {
// Error creating fields!
alert("Error synchronizing user names!");
errorOccured = true;
}
}
});
});
if( errorOccured == false)
{
alert("User name synchronized successfully.");
$(window.location).attr('href', 'currentpagename.aspx');
}
}
});
}
</script>
P.S:
- The performance of this code will get affected based on the size of the user group.
- The Team Members custom list must have "User" field with people and group type.
Solution: This is done using jquery and SharePoint web services.
Code:
<script type="text/javascript" src="https://siteurl/Documents/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="https://siteurl/Documents/jquery.SPServices-0.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#syncUsers").click(function() //'syncUsers' is the ID of button control added in the CEWP
{
var errorOccured = DeleteUsersFromTeamMembersList();
if(!errorOccured)
{
AddUsersToTeamMembersList();
}
});
});
// to delete the existing users from the custom list
function DeleteUsersFromTeamMembersList()
{
var errorOccured = false;
$().SPServices({
operation: "GetListItems",
async: false,
debug: true,
listName: "Team Members",
CAMLViewFields: "<ViewFields></ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
$().SPServices({
operation: "UpdateListItems",
async: false,
debug: true,
batchCmd: "Delete",
listName: "Team Members",
ID: $(this).attr("ows_ID"),
completefunc: function (xData, Status) {
msgData = xData.responseText;
isError = msgData.indexOf("ErrorText");
if (isError > 0) {
// Error creating fields!
alert("Error deleted user names from Team Member list!");
errorOccured = true;
}
}
});
});
}
});
return errorOccured;
}
//add all the users from the sharepoint group to custom list.
function AddUsersToTeamMembersList()
{
var alreadyProcessed = false;
var userName ;
var iD;
var userID;
var errorOccured = false;
$().SPServices({
operation: "GetUserCollectionFromGroup",
groupName: "Deliverable Owners",
completefunc: function (xData, Status) {
$("#results").text(xData.responseXML.xml);
$(xData.responseXML).find("User").each(function () {
userName = $(this).attr("LoginName");
iD = $(this).attr("ID");
userID = iD +";#"+userName;
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "New",
listName: "Team Members",
valuepairs: [["User",userID ]],
completefunc: function(xData, Status)
{
msgData = xData.responseText;
isError = msgData.indexOf("ErrorText");
if (isError > 0) {
// Error creating fields!
alert("Error synchronizing user names!");
errorOccured = true;
}
}
});
});
if( errorOccured == false)
{
alert("User name synchronized successfully.");
$(window.location).attr('href', 'currentpagename.aspx');
}
}
});
}
</script>
P.S:
- The performance of this code will get affected based on the size of the user group.
- The Team Members custom list must have "User" field with people and group type.
Thursday, February 14, 2013
Insert a row into a list using JQuery and Web Services
Requirement: Insert a row in the list using jQuery and Web Services.
Variables (not initiating here, as the values are dynamically generated by another method)
- allTeamMembers (user name)
- firstSaturday (date)
Project_Name is a lookup field, the values for lookup field should be the combination of ID of item in the Lookup list and the lookup value
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "New",
listName: "Resource Allocation List",
valuepairs: [["pcompleted",0],["TeamMember",allTeamMembers],["Title","Dummy Entry"],["Week_Ending",firstSaturday],["Project_Name","20;#Others"]],
completefunc: function(xData, Status) {
msgData = xData.responseText;
isError = msgData.indexOf("ErrorText");
if (isError > 0) {
alert("Error creating missing entries!");
errorOccured = true;
}
}
});
Retrieve column values from a list using JQuery and Web Services
Requirement: To get the values of "Team Member" field from "User Allocation list" list with a filter condition.
Solution:
Following is the javascript code to retrieve the column values from a list using web services.
function getCompletedEmployeesList(){
var date = new Date();
var aTmp = new Array();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
firstDay = firstDay.getFullYear()+"-"+(firstDay.getMonth()+1)+"-"+firstDay.getDate();
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
lastDay = lastDay.getFullYear()+"-"+(lastDay.getMonth()+1)+"-"+lastDay.getDate();
$().SPServices({
operation: "GetListItems",
async: false,
listName: "User Allocation List",
CAMLViewFields: "<ViewFields Properties='True' />",
CAMLQuery: "<Query><Where><And><Neq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Neq><And><Leq><FieldRef Name='Week_x002d_Ending' /><Value IncludeTimeValue='FALSE' Type='DateTime'>"+lastDay +"</Value></Leq><Geq><FieldRef Name='Week_x002d_Ending' /><Value IncludeTimeValue='FALSE' Type='DateTime'>"+firstDay +"</Value></Geq></And></And></Where></Query>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
var teamMember = $(this).attr("ows_TeamMember");
aTmp.push(teamMember);
});
}
});
return aTmp;
}
Monday, January 28, 2013
Display current site name in Content Editor Web Part using JavaScript
Add the following script in a Content Editor Web Part
<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("GetSiteName");
function GetSiteName(){
var SiteName = document.getElementById('ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle').innerHTML;//get the ID from 'view source' page
document.getElementById('lblsitename').innerHTML = SiteName;
}
</script>
<html>
<label id="lblsitename"></label>
</html></div>
<script language="javascript" type="text/javascript">
_spBodyOnLoadFunctionNames.push("GetSiteName");
function GetSiteName(){
var SiteName = document.getElementById('ctl00_PlaceHolderSiteName_onetidProjectPropertyTitle').innerHTML;//get the ID from 'view source' page
document.getElementById('lblsitename').innerHTML = SiteName;
}
</script>
<html>
<label id="lblsitename"></label>
</html></div>
Friday, January 18, 2013
Date Picker control in Content Editor Web Part
<html lang="en">
<head>
<style >
div.ui-datepicker{
font-size:11px;
}
</style>
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script>
$(function() {
$( "#fromdatepicker" ).datepicker();
$( "#todatepicker" ).datepicker();
});
$(function() {
$("#btnFilter").click(function() {
var startDate = $("#fromdatepicker").datepicker("getDate");
startDate = startDate.getFullYear()+"-"+(startDate.getMonth()+1)+"-"+startDate.getDate();
var endDate = $("#todatepicker").datepicker("getDate");
endDate = endDate.getFullYear()+"-"+(endDate.getMonth()+1)+"-"+endDate.getDate();
alert(startDate +"-"+ endDate);
});
});
</script>
</head>
<body>
<p>
From Date: <input type="text" id="fromdatepicker" style="font-size:11px" />
To Date: <input type="text" id="todatepicker" style="font-size:11px" />
<input type="button" id="btnFilter" value="Generate Report">
</p>
</body>
</html>
Subscribe to:
Posts (Atom)
