Wednesday, July 11, 2012

SharePoint 2010 Infopath Print Button

Once you have your Infopath form put together and published to a List, go to the List page.

1. Click on the “List” tab under List Tools
2. Click on the drop down arrow on the “Modify Form Webparts” button
3. Select “(Item) Display Form”
4. This will take you to an edit page screen with your Infopath form set as a webpart
5. Add a “Content Editor Webpart” to the page
6. Edit your new webpart’s source and paste in the following:


input type="button" value=" Print" onclick="window.print();return false;"

Note:


This adds a print button to the page that uses the default print call within a browser.  Since we edited the “Display” form, the button will not appear if a user is editing the form or creating a new item.
tags are not required

Monday, July 2, 2012

Finding List GUID ID

There will be several times when you need the Guid or ID of list or view - for example while passing these in for adding, updating or deleting list item in SharePoint through List service or when setting the Task list to be used with SharePoint Designer Workflows. Here is a simple way to accomplish the same.



For List:


1.Navigate SharePoint site


2.From “Settings” menu select “List Settings”


3.Copy the entire URL and paste in any text editor


It would look something like this:
http://mossserver/_layouts/listedit.aspx?List=%7B2761B4AF%2D6452%2D448F%2DADF6%2D6FBA18DAAB81%7D
1.Delete everying before and including “List=”.


2.Change “%7B” to “{”


3.Change all “%2D” to “-“


4.Chnage “%7D” to “}”


You are now left with the following:
{2761B4AF-6452-448F-ADF6-6FBA18DAAB81}
_



For View:
For View's GUID you can perform the same steps
_


Note:
In case of View its little tedious, because when you will copy the link in text editor it will also consist of GUID of list and url of Source.


For example it would be something like this


http://mossserver/_layouts/listedit.aspx?List=%7B2761B4AF%2D6452%2D448F%2DADF6%2D6FBA18DAAB81%7D&View=%7B58B8F4B8%2DA2F6%2D4E3C%2D9F1F%2D4657F664B4D2%7D&Source=%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D%25257B76E983B9%25252D5FCC%25252D4D3E%25252D8DE9%25252D671932BB3308%25257D


So you have to be careful while removing unnecessary part from the copied link