Monday, March 31, 2014

Disable multiline textbox and single line textbox in SharePoint using jQuery


In this post I will discuss how we can disable or make readonly to multiline textbox and single line textbox in SharePoint using jQuery. We will make this is Edit form in SharePoint list.

You can use SharePoint Designer to make a field read only. Here is a method to make a field readonly using Jquey  and a Content Editor Web Part Edit the EditForm.aspx page

By default it comes like below:
 
 




If the Edit Page option is missing from the Site Actions menu, use the ToolPaneView=2 URL parameter.
Ex: 
1. /EditForm.aspx?ToolPaneView=2
2. Add a Content Editor Web Part
3. Add the following code (in this example, “Question” is the name of my field):
 
Below is the jQuery Code:
 
$(document).ready(function () {
       
            ConvertTextboxToLable('Title');
            ConvertTextareaToLable('Description');
});

    //Convert TextArea to Lable
    function ConvertTextareaToLable(colName) {
        var txtHTML = $("textarea[Title='" + colName + "']").html();
        var tdColumn = $("textarea[Title='" + colName + "']").closest('td');
        var tdColumnHTML = $(tdColumn).html();

        $(tdColumn).html("<div style='display:none'>'" + tdColumnHTML + "'</div>");
        $(tdColumn).append(txtHTML);
    }

    //Convert Textbox to Lable
    function ConvertTextboxToLable(colName) {
        var txtHTML = $("input[type=text][Title='" + colName + "']").val ();

        var tdColumn = $("input[type=text][Title='" + colName +  "']").closest('td');

        var tdColumnHTML = $(tdColumn).html();

        $(tdColumn).html("<div style='display:none'>'" + tdColumnHTML +  "'</div>");
        $(tdColumn).append(txtHTML);
    }

After this, it will appear like below:
 


 

Thursday, March 20, 2014

SharePoint 2013 list column status wise Change row Color using jQuery


Introduction:
 
In this article we have been given is to put together a Requester monitoring list which is easy enough to do in SharePoint, but the 3 status easy visual way of seeing what status each of the requester was on.

The status used in this list is:
Approved
Rejected
Pending
These values are populated from a Choice field in the list, But as you can see from the before image below it is not that easy to quickly and easily see what level each of the Requester is on.
 
 






 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
On the Edit page, select the Insert Web Part tab from the Ribbon. From the Categories menu, select Media and Content and then Script Editor from the Parts menu: 




















Click on the Add button at the bottom of the page to install the Web Part. 
Embedding Code to Your Site:

Once the Web Part has been successfully installed on your page, you will see a hyperlink button under the Script Editor labelled EDIT SNIPPET. Click the EDIT SNIPPET link to insert HTML/Script code:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){$Text = $("td.ms-cellstyle.ms-vb2:contains('Approved')");$Text.parent().css("background-color", "#01DF3A");
$Text = $("td.ms-cellstyle.ms-vb2:contains('Rejected')");
$Text.parent().css("background-color", "#F90101");
$Text = $("td.ms-cellstyle.ms-vb2:contains('Pending')");
$Text.parent().css("background-color", "#EAC117");
});
</script>
 
 
 
 
 
 
 
 
 
 









After you have inputted the appropriate code in the Embed dialog box, click Insert to save the HTML/Script. 
Below you can see the end result with some data entered and different names against different action Status
 
 
 
 


Saturday, March 8, 2014

How to synchronize new user from Active Directory in SharePoint 2010?

In this post I will discuss how to synchronize new user from Active Directory in SharePoint 2010?

For Synchronize new user from Active Directory in SP 2010 follow these step:

1. Go in synchronization by user profile service from Central Administrator (See in fig).
 


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2. Click in configure synchronization connection and create new connection (See in fig).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3. Under this enter the account name as administrator and password.

4. After this fill up all required things and click OK.

5. Return back to synchronization and click on start profile synchronization and wait.

6. Wait until in left side the synchronization status is Ideal.

7. Now you able to see all user profile from Active Directory.

 

Tuesday, March 4, 2014

List of SharePoint Event Model in Sharepoint 2010



In this post I will discuss about various SharePoint event model in SharePoint server 2010


Following the List of SharePoint Event Model:

1. Before and After Events
2. Event Hosts
3. Event Receivers and Handling Events
4. Binding Event Handlers

1. Before and After Events:

These events fires before an action occurs and before SharePoint has written any data to the content database. For this reason, Before events are always synchronous.

You can identify Before events because their member names end with the "-ing" suffix – for example, ItemAdding, ListAdding, ItemDeleting, ListDeleting.

After events, on the other hand, trigger event handlers that execute after user actions are committed to the content database and they invoke code that runs after the content database has been modified. This provides an opportunity to develop code that executes logic that occurs after a user has completed a specific action.

Because After events execute in a different process from the triggering action, they can execute either synchronously or asynchronously. You can identify After events because their member names end with the "-ed" suffix – for example, ItemDeleted, WebProvisioned.

2. Event Hosts:
Event hosts are objects, such as site collections, Webs, lists and list items, that expect to receive events – or, in other words, objects whose event receivers "listen" for SharePoint Foundation events. These SharePoint Foundation 2010 event host object types include instances of common objects such as SPSite, SPWeb, SPList, and SPContentType. Each of the event host types has specific event receiver base types from which you can inherit, to create an event receiver collection.

3. Event Receivers and Handling Events:
SharePoint Foundation event handlers are a compiled module of custom managed code whose invocation is triggered by a specified event that you have specified. Event handler code is compiled into a .dll file and deployed to the GAC.

4. Binding Event Handlers:
After your event handler code is compiled and deployed to the GAC, you need to bind it to a receiver object. Also known by the term "register," binding is the process by which event handler code is associated with an object type.

Following Event types:

- Site Events
- Web Events
- List Events
- List Field Events
- Item Events

Sunday, March 2, 2014

Overview on Performance report

You can use PerformancePoint Dashboard Designer to create lots of reusable reports and scorecards for your dashboards. As you create each report or scorecard, you begin by selecting a template. In Dashboard Designer, you can select from 8 report templates and 7 different scorecard templates. This article describes the different report and scorecard template that are available.
1.       Report templates
2.       Scorecard templates:
Report templates
PerformancePoint reports can vary greatly in appearance and functionality. In addition, these reports can vary in what you do to create them. For example, you create some reports by using Dashboard Designer. For other reports, you do not actually create the reports; instead, you create a PerformancePoint Web Part to display an existing report. Finally, for some reports, you must have at least one scorecard created to successfully create and display information in those reports.
Analytic Chart:
An analytic chart is an interactive line, bar, or pie chart that you create and configure by using Dashboard Designer. Analytic charts use data that is stored in SQL Server Analysis.
For more information, see Overview of PerformancePoint analytic charts and grids and Create an analytic chart or grid by using Dashboard Designer.

Analytic Grid:
An analytic grid is an interactive table that you create and configure by using Dashboard Designer. Analytic grids use data that is stored in SQL Server Analysis.
For more information, see Overview of PerformancePoint analytic charts and grids and Create an analytic chart or grid by using Dashboard Designer.

Excel Services:
An Excel Services report is an Excel workbook that was published to Microsoft SharePoint Server 2010 by using Excel Services.
In Dashboard Designer, you do not actually create an Excel Services report; instead, you create a PerformancePoint Web Part to display all or part of an Excel workbook. You can use an Excel Services report to display a PivotChart report, a PivotTable report, or any chart or table that you create in Excel.
For more information, see Overview of Excel Services reports displayed in PerformancePoint Web Parts and Create an Excel Services report by using Dashboard Designer.

KPI Details:
A KPI Details report is a report that serves as a companion to a scorecard to provide additional information about scorecard key performance indicator (KPI) values and properties.
A KPI Details report does not contain or display information by itself; instead, the KPI Details report derives all its information directly from the scorecard to which it is connected. Dashboard users click a value in a scorecard, and the KPI Details report updates to display additional information about that particular scorecard value without cluttering up the scorecard.
For more information, see Overview of PerformancePoint KPI Details reports and Create a KPI Details report by using Dashboard Designer.

ProClarity Analytics Server Page:
A ProClarity Analytics Server Page report is a view that was published to ProClarity Analytics Server.
In Dashboard Designer, you do not actually create a ProClarity Analytics Server report; instead, you create a PerformancePoint Web Part to display an existing ProClarity view. You can use a ProClarity Analytics Server Page report to display specific view types, such as the Performance Map, Perspective View, and Decomposition Tree in your dashboard.
For more information, see Overview of ProClarity Server reports displayed in PerformancePoint Web Parts and Create a ProClarity Server report by using Dashboard Designer.

Reporting Services:
A Reporting Services report is a view that was published to SQL Server Reporting Services Report Server.
In Dashboard Designer, you do not actually create a Reporting Services report; instead, you create a PerformancePoint Web Part to display an existing Reporting Services report. You can use a Reporting Services report to display powerful reports that were created by using SQL Server Reporting Services Report Builder in your dashboard.
For more information, see Overview of Reporting Services reports displayed in PerformancePoint Web Parts and Create a Reporting Services report by using Dashboard Designer.

Strategy Map:

A strategy map is a report that serves as a companion to a scorecard to show relationships between objectives, goals, and KPIs at a glance. Strategy maps are based on the Balanced Scorecard framework.
A strategy map uses a scorecard as its data source and a Visio diagram as its display structure. For more information, see Overview of PerformancePoint strategy maps and Create a strategy map by using Dashboard Designer.
  
Web Page:
A Web Page report is a fully functional internal or external Web site that you can display alongside other reports in your dashboard.
In Dashboard Designer, you do not actually create a Web Page; instead, you create a PerformancePoint Web Part to display an existing Web site. For more information, see Overview of Web Page reports in Dashboard Designer and Create a Web Page report by using Dashboard Designer.
Decomposition Tree:
A Decomposition Tree is an interactive view that dashboard users open from a scorecard or a report that uses SQL Server Analysis Services data. However, as a dashboard author, you do not create the Decomposition Tree by using PerformancePoint Dashboard Designer. In addition, you cannot display a Decomposition Tree as a top-level report view that is always displayed in a dashboard alongside other reports.
For more information, see Overview of the PerformancePoint Decomposition Tree.
 
Scorecard templates
A scorecard is a special kind of report that provides a high-level snapshot of performance for a group or an organization. A scorecard provides a visual representation of performance that can give you a summary of progress at a glance. For more information, see Overview of PerformancePoint scorecards.
When you create a PerformancePoint scorecard, you can use a wizard to guide you through the process. When you use a wizard, you begin by selecting a template. The template that you select corresponds to the kind of data source that you plan to use for at least one key performance indicator (KPI) in your scorecard.
Make sure that Dashboard Designer is configured to use a scorecard wizard. To learn more, see Turn on or off the scorecard wizard in Dashboard Designer.
 
Analysis Services:
The Analysis Services scorecard template enables you to create a scorecard that uses an Analysis Services data source for at least one KPI in the scorecard.
Depending on how an Analysis Services scorecard is configured, dashboard users can perform certain tasks that are not necessarily available with other scorecard templates:
·         Use Show Details to view transaction-level details for a particular scorecard value.
·         Open a Decomposition Tree to decompose, or analyze, a group to see its individual members and how they can be ranked according to a selected measure. For more information, see Learn about the Decomposition Tree (http://go.microsoft.com/fwlink/p/?LinkId=204883).
·         View higher or lower levels of data in the scorecard.
·         View dynamic dimension hierarchies in the scorecard.
When you use the Analysis Services scorecard template, you can create KPIs that are based on measures in the data cube, or you can select existing KPIs that you or other dashboard authors have created. However, you can also copy KPIs that are defined in the data cube into the scorecard. This ability to copy KPIs is unique to the Analysis Services scorecard template.
For more information, see Create an Analysis Services scorecard by using Dashboard Designer.
 
Blank Scorecard:
The Blank Scorecard template enables you to create an empty scorecard that has no KPIs or other information. You would typically create a blank scorecard when you and other dashboard authors have already created KPIs.
For more information, see Create a blank scorecard by using Dashboard Designer.
 
Fixed Values Scorecard:
The Fixed Values Scorecard template enables you to create a scorecard that does not use a separate data source. When you use this template, you specify the values for the scorecard while you use the wizard. For more information, see Create a Fixed Values scorecard by using Dashboard Designer.
Tabular templates. They include the following:
  • Excel Services
  • Excel Workbook
  • SharePoint List
  • SQL Server Table
The four tabular templates (Excel Services, Excel Workbook, SharePoint List, and SQL Server Table) enable you to create a scorecard that uses a tabular data source for at least one KPI in the scorecard. Similar to the Analysis Services scorecard template, when you use a tabular data scorecard template, you can create KPIs that are based on measures in the data source, or you can select existing KPIs that you or other dashboard authors have created.