Posts

Showing posts with the label SharePoint 2010

The super user account utilized by the cache is not configured

Resolving "The super user account utilized by the cache is not configured." If you have a SharePoint Publishing site and you check the event viewer every once in a while you might see the following warning in there: Object Cache: The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unneccesary system resources. To configure the account use the following command 'stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl'. The account should be any account that has Full Control access to the SharePoint databases but is not an application pool account. Additional Data: Current default super user account: SHAREPOINT\system This means that the cache accounts for your web application aren’t properly set and that there will be a lot of cache misses. If a cache miss occurs the page the user requested wil...

Hide Workflow History in WrkStat.aspx

Image
There are times when you want to show the Workflow History only to Admin Users and not for normal users. But whenever a user clicks on the status of the Workflow, it redirects to the _layouts/WrkStat.asp and shows all information for all users. In order to avoid that, we can take advantage of the SPSecurityTrimmedControl. Open the WrkStat.aspx from 14->template->layouts in Visual Studio and then add <Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageLists"> in Line 128 and close the tag in Line 239. You will have the Workflow History Page appear like this for non-admin users :)

Showing QuickLaunch in a WebPart Page

With SharePoint 2007 all you needed to do was edit the page in SharePoint Designer and remove the following 2 lines: < asp:Content ContentPlaceHolderId=”PlaceHolderNavSpacer” runat=”server”></asp:Content> < asp:Content ContentPlaceHolderId=”PlaceHolderLeftNavBar” runat=”server”></asp:Content> With SharePoint 2010 you also need to delete the following: < style type=”text/css”> body #s4-leftpanel { display:none; } .s4-ca { margin-left:0px; } </style> The quick launch will now display on the web part page. Make sure you do this in the Advanced Editor Mode of this WebPart page.

SharePoint 2010 Stop .debug.js files from downloading

http://sharepoint.stackexchange.com/questions/13455/can-all-the-layouts-xxx-debug-js-files-not-be-served-to-end-users When I view my SharePoint site I see a lot of .debug.js files being added by SharePoint. Is there a way to stop this happening. cui.debug.js core.debug.js sp.debug.js sp.ribbon.debug.js init.debug.js they account for around 400k of the page download. Gotcha, in your masterpage, set the ScriptMode to Release, so that it looks like this:  <asp:ScriptManager id="ScriptManager" runat="server" ScriptMode="Release" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />  –  James Love   May 26 '11 at 18:25

Email as attachment - codeplex solution works

Image
SharePoint has "Email as a Link" for all document libraries, but not "Email as attachment". How handy would it be when you need to send a document that is present inside a Document Library to external people with just their e-mail id. Found a solution in CodePlex and it really works fine. It works for single selection as well as multi-selection http://sendemailsp2010.codeplex.com/ Steps: 1.        Add .WSP 2.        Deploy from Manage FARM Solutions 3.        Activate Site Collection Feature 4.        Then Add Site to Trusted Sites, in the Trusted Sites -> Custom Level, you need to enable the below setting Once you are done with this, you  will see your document library as below:

Updating hyperlink fields programmatically

Data in the Hyperlink Column can be populated / set in the following manners:   Item[“HyperLinkColumnName”] = “http://www.google.com, Google”; Item.Update();   Don’t forget space after comma.   Or   SPFieldUrlValue MyURL = new SPFieldUrlValue(); MyURL.Description = “Google”; MyURL.Url =  http://www.google.com ; Item[“HyperLinkColumnName”] =  MyURL;     Data from the Hyperlink Column can be get in the following manner:   SPFieldUrlValue MyURL = new SPFieldUrlValue(Item[“HyperLinkColumnName”].ToString());   string URLText = MyURL.Description; string URL = MyURL.Url;  

Nice DropBox and Document Rating Add-On for SharePoint 2010

http://sptoolbasket2010.codeplex.com/

SharePoint Mobile Integration

For all devices – iPhone, Blackberry, Android, Symbion http://www.noko.co.uk/what_we_do/solutions_for_sharepoint_2007/sharepoint_for_smartphones.aspx For iPhone only http://www.moprise.com/ For iPhone only http://itunes.apple.com/gb/app/ishare/id305862898?mt=8 (Spyk Software) For Blackberry Only http://silverdust.softartisans.com/blackberry-sharepoint-mobile-integration-use-cases-457.aspx For Blackberry Only http://www.wicksoft.com/sharepoint_summary.htm Noko – Mobile Entrée Base Plugin The Mobile Entrée Base Plugin provides out of the boxconfigurable access to: ·          Search - with a configurable scope ·          Lists - Control which lists and views are made available to mobile users (includes support for Announcements,Calendars, Tasks and Links) ·          Doc...

SharePoint 2010 PerformancePoint Services with Analysis Services (SSAS) Cube

PerformancePoint Services and its Dashboard Designer are touted to be wonderful things that came free with SharePoint 2010! A kind of a monster product that independently existed (as PerformancePoint Server 2007 before) to be now available with our beloved SharePoint... When you start PPS, you start facing it's instability and unfriendly nature of guiding you through creating great BI Solutions. Microsoft BI - one thing that people always think, great, Microsoft allows us to pull data from Tabular data such as Excel Sheets, SharePoint Lists and SQL Server Tables and create Charts, Scorecards, KPIs and perform Analysis - and it is always thought that, you really do not need to have your SSAS Cubes created (this always is a mystery for many!). Actually, you will soon realize that, you can realize the full potential and power of PPS, only if you have your Data Source really as Analysis Services Cubes.. Infact, apart from KPIs and Scorecards (which is just a grouping of your...

Using External Content Types with Stored Procedures with Input Parameters

Image
You must have tried External Content Types - the exciting new feature in SharePoint 2010 to connect to an external SQL table and provide a list where it lists, creates, updates data straight into the SQL table. People always wonder, how do you get a ECT to work with a Stored Procedure, one that has input parameters. You could do it this way... Step 1: In your SharePoint Designer 2010, create a new external content type Step 2: Connect to your SQL Server and then make sure you see the Routines (your stored procedures must be listed here) Step 3: Rt Click on the Stored Procedure name and create operations for "Read Item" and "Read List" - both are required for the External Content Type's SharePoint list to be created. During both these wizards, in the Input Parameters, your SP's Input Parameter will be listed. Here, you need to create a filter, which sends out it's value to the SP's filter. For example, if your SP's Input Parameter is @Emp...

Error occurred in deployment step ‘Recycle IIS Application Pool’: Invalid namespace

If you ever encounter this error with a SharePoint 2010 Environment on Windows 7, Ensure, you enable this: Internet Information Services -> Web Management Tools -> IIS 6 Management Compatibility -> IIS 6 WMI Compatibility

SharePoint Datasheet View

If SharePoint 2007 or 2010 Datasheet View is not working, you need to install: Access 2007 Download: Access Runtime http://www.microsoft.com/downloads/en/details.aspx?familyid=d9ae78d9-9dc6-4b38-9fa6-2c745a175aed&displaylang=en Or 2007 Office System Driver: Data Connectivity Components http://www.microsoft.com/downloads/en/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en In every client machine!

Arabic Language Pack on SharePoint 2010 running on Windows 7

If ever you want to install Arabic Language Pack on SharePoint 2010 running on Windows 7, you will get a pre-requisite requirement of having Windows Server 2008 OS. To overcome this, you need to do a similar change to the files\setup\config.xml the way you did in the SharePoint 2010 install. Extract the Arabic Lang Pack using /extract switch to a folder. Edit the config file to add the below line. The following needs to be added. <Setting Id=”AllowWindowsClientInstall” Value=”True”/>

Validate a SharePoint Date Field against Current Date in Javascript

Consider the following scenario: You have a SharePoint Site which has its regional settings set to English (UK) - so that the date format becomes dd/mm/yyyy in all date pickers You would like to validate a particular date field in your List or Document Library against the current date If the validation does not pass, you should not allow the form to save So what the script does is: Uses the sputility (check my previous posts and also look at http://sputility.codeplex.com) to get the particular SharePoint date field It comes out as a date datatype, so I cast it to string Since the format is in dd/mm/yyyy and Javascript compare and date functions work only with mm/dd/yyyy, I am converting them back to that format then using UTC string conversions and comparing... Enjoy! <script type="text/javascript"> function PreSaveAction() {  var createdate = SPUtility.GetSPField('Date of Creation').GetValue();  var createdatestr=createdate.toString();      ...

SharePoint Configuration Wizard Failing - RPC Server is unavailable

Image
If you encounter this issue, it is clear that your SP machine is unable to get the credentials verified with the Active Directory. Try ipconfig /flushdns - and if it still does not work, do ipconfig /registerdns

Validating Taxonomy Metadata Field in Javascript (Multiple Value Field)

In my previous post, I had mentioned about performing validation of a single value taxonomy field. This script does validation of a multi-value field. This and the previous script works for how many ever taxonomy fields you have in the edit form. Now what I am trying to do is validate and prevent the user from saving the document if the same value repeats in those fields. ******************************* <script type="text/javascript">         function PreSaveAction() {             //alert("calling before save")             var iRef = document.getElementsByTagName("div");             var arr = new Array();             var duplicate = false;             var errors = new Array();             for (var i = 0; i < iRef.length; i...

Validating Taxonomy Metadata Field in Javascript (Single Value Field)

Many of us have requirements of validating Metadata Fields in the client side itself, thus giving a nice little alert message and avoiding save....very interactive and nice.... Find below a script that you can use for the same. All you need to do is, go to your Document Library or List, Go to the Edit Form WebPart Page, add a Content editor WebPart, edit the HTML Source and put this script inside... below the Edit Form and Save the Page back (Page ribbon -> Stop Editing).... The script is inside the PreSaveAction() that is called by the SharePoint Save method, which if returns false, the validation is considered failed and SharePoint does not save the data.. -------------------------------------------------- <script type="text/javascript"> function PreSaveAction() { var iRef = document.getElementsByTagName("div"); var arr = new Array(); for(var i=0;i<iRef.length;i++) {   if(iRef[i].id.indexOf("editableRegion")>=0)   {   ...

Windows 7 Send To SharePoint Document Library

Steps for Send To from Windows Explorer SharePoint 2010 with Windows 7 Steps: Open your Document Library Navigate to your Library Ribbon, click on "Open With Explorer" Copy the path from the URL bar Go to your My Computer, Map Network Drive to this path Now, from all your files, you will have the Send To Appearing for this Network Drive You will be able to directly send files to your Document Libraries from your exploer

PeoplePicker - Picking user from multiple domains, stsadm commands

Image
When you want to pick users from multiple domains in your SharePoint Site's PeoplePicker (it will comfortably work in the Central Administration though!), here is what you need to do. 1. Ensure there is a trust relationship between the two domains (one domain could also be a child domain of another) 2. Run the stsadm -o setapppassword command 3. Run the stsadm -o setproperty command Find screenshots below:

Migrating SharePoint Designer Workflow within same site or different sites

When we have developed complex workflows using SPD, we always find a way to migrate / re-import SharePoint Designer Workflows within the same site or different sites. There is a WF Migrator tool here: http://spwflmigrator.codeplex.com/ . You should try this to see how it works. If not, there seems to be a SPD WF migration tool for $99: http://www.elegrity.com/content/ElegritySharePointTools The below URL has got screenshots too – to explain this. http://blogs.msdn.com/b/sharepointdesigner/archive/2007/07/06/porting-sharepoint-designer-workflows-to-visual-studio.aspx Before reading the above, I would recommend reading this – where they talk about why it is not easy to port and what aspects to be considered. http://www.endusersharepoint.com/2008/12/08/why-can%E2%80%99t-i-easily-port-sharepoint-designer-workflow-solutions-from-one-list-to-another-part-1/ This is also another blog, which describes this: http://decodesharepoint.blogspot.com/2010/01/migrate-spd-workflows.html B...