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




Sunday, June 24, 2012

Attempted to perform an unauthorized operation


Issue Details:
 System.Web.Services.Protocols.SoapException: Server was unable to process request. —> Attempted to perform an unauthorized operation.



Solution:

Check if the current user has appropriate permissions on SharePoint site.


The Web Application should be configured configured with Integrated Windows Authentication and anonymous access should be disabled/unchecked.


Go to IIS —> Website —> Properties —> Directory Security         —> Uncheck Enable Anonymous Access


 

Tuesday, June 12, 2012

How to make MOSS 2007 search results open in new window

I wanted to be able to open links in new windows since I noticed a lot of users often times were searching for say PDF’s and then they would accidentally close the browser instead of hitting the back button. Big annoyance for them.

So I was snooping around the Search Core Results Web Part’s XSL Editor to see if I could edit the XSL to open links in new windows instead. It’s actually pretty easy, here are the steps:

1. Go to http://portal/searchcenter/pages/results.aspx

2. Modify Shared Web Part for the Search Core Results WebPart

3. Click on the XSL Editor Button

4. I’d suggest copying the contents of the pop up into notepad/wordpad to do your editing.

5. Search for the following lines:


6. At the ends of each of the
tags, you’ll want to add on target=”_blank”

For example to make the link attached to the document icon open in a new window, the full tag would be like this:




Using the same XSL Editor you can also manipulate how your search results are displayed and even include custom content types if you wanted to!

SSP Access Denied Issue

Problem definition:Even though you are the farm administrator, site collection admin for the ssp, you get access denied error, when you click on the 'User profiles and properties'.Sharepoint Central Admin -> SharedServices1 -> User Profiles and My Sites -> User profiles and properties'


Fix:
Go to Personalization services permissions link located under the User Profiles and My Sites section on the shared services1 page.Sharepoint Central Admin -> SharedServices1 -> User Profiles and My Sites -> Personalization services permissions
Add users/group. Add yourself with the manage user profiles permissions.If you are the admin then add the user who complained about the access.

Failed to instantiate file "TopAnswer.webpart" from module "WebPartPopulation": Source path "dwp\TopAnswer.webpart" not found.

Issue Details:


Failed to instantiate file "TopAnswer.webpart" from module "WebPartPopulation": Source path "dwp\TopAnswer.webpart" not found.
Troubleshoot issues with Windows SharePoint Services.


Solution Details:


1. Clear the SharePoint Fonfiguration Log Files


2. Upgrade MOSS SP2.

An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove

"An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. Troubleshoot issues with Windows SharePoint Services."


You may receive an error with a SharePoint page that has other web parts. The immediate fix is to delete the web part, but that's not a real workaround. Changing the trust level for the site worked for me.


This is the complete fix:1. Open web.config file of current web application
2. Find the node that begins 3. Change the trust level from WSS_Minimal to WSS_Medium
4. Save the file
5. Drop to command prompt and execute : iisreset

SharePoint always prompts for login credentials

I recently configured SharePoint 2010 on Windows 2008 R2 and created couple of applications. Although everything works fine, one thing bothers me every-time that is, filling login credentials whenever I open the site.


All I wanted to was, just open the site without re-entering the user id and the password. Should not it be intelligence enough for identifying the current user and let him (me) login to the site? Yes it should be and it does :). Actually, this is not related to SharePoint, it is IE. If you face the same issue, all you have to do is;

1.Get Tools –> Internet Options in IE and go to Security tab.

2.Add your site to the Trusted Sites.

3.Then click on Custom Level in Security tab, and select Automatic logon with current user name and password option under User Authentication – Logon.