Skip to main content

Posts

Showing posts from June, 2011

Sharepoint Datasheet view is not working in office 2010

Overview The 64bit version of office 2010 leaves us a bit wanting. For those users that uninstall Office 2007 and install the new 64 bit addition, a host of feature will not work without the addition of the 2007 Office System Driver Data Connectivity components. Here are the details on what is supported: http://technet.microsoft.com/en-us/library/cc263526.aspx “Datasheet view Requires a 64-bit ActiveX control. Microsoft Office 2010 does not provide a 64-bit version of this control.” Resolution Download and install the 2007 Office System Driver: Data Connectivity Components http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7554f536-8c28-4598-9b72-ef94e038c891 The 2010 component can be found at Microsoft at: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=10910

SharePoint user profile properties read / Modify using object model

//Updates a user profile //Creates a user profile. Obtains the property values from the default //domain controller or the master connection that is configured on the //server using System; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint.Administration; using Microsoft.Office.Server.UserProfiles; using Microsoft.SharePoint; using Microsoft.Office.Server; using System.Web; namespace UserProfilesApp { class Program { static void Main(string[] args) { try { using (SPSite site = new SPSite("http://servername")) { SPServiceContext context = SPServiceContext.GetContext(site); UserProfileManager profileManager = new UserProfileManager(context); string sAccount = "domainname\\username"; UserProfile u = profileManager.GetUserProfile(sAccount); u[PropertyConstants...

SharePoint Calendar & Meeting Workspace

Tips & Trics : 1. SharePoint 2010 Meeting workspace recurrance date if you clicked its showing the javascript error means - update the Apr 27th cummulative update then it will work perfectly. 2. Under meeting workspace subsite creation is not available. 3. when you delete any calendar item if its contains any recurrance meeting - then actually it not getting delete thats the reason item  Deleting, Deleted event will not triggered. Actually it will concate the title value Deleted:meetingtitle and point as deleted icon as well, so item updating and updated event only will trigger

Dymanic Header Color For your Webparts

Paste the below script on your Content Editor Webpart, put this webpart in the footer zone. All webparts will render based on the color specified in the Array order. <script type="text/javascript"> var bcol=new Array("#E18B6B", "#F665AB", "orange", "rose", "blue"); var rcnt=0; var x= document.getElementsByTagName("TD"); for(var i=0;i<x.length;i++) { if(x[i].title !="Forums" && x[i].title !="") { if(rcnt == 5) rcnt=0;  var td =x[i]; var row =td.parentNode;  for (var j = 0, col; col = row.cells[j]; j ++) {      col.style.backgroundColor =bcol[rcnt];    }   td.parentNode.style.backgroundColor =bcol[rcnt]; td.style.backgroundColor=bcol[rcnt]; rcnt =rcnt +1; } }</script>

Show Ribbon Permission based

you can open the master page add the permissionstirng then ribbon control will appear only if the user has manage web permission only. <SharePoint:SPRibbon runat="server" PermissionsString="ManageWeb" PlaceholderElementId="RibbonContainer" http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.permissionsstring.aspx http://styledpoint.com/blog/ribbon-customization-changing-placement-look-and-behavior/

3D TagCloud for SharePoint 2010

http://3dtagcloud.codeplex.com/

How to Remove Workspace Link from a Calendar

First, we need to provision a new calendar with our custom Feature: <?xml version="1.0" encoding="utf-8" ?> <Feature     Id="AF8444FE-65D9-4ae2-BAD7-C39917871474"     Title="Calendar without Workspace Link"     Description="Installs a new calendar without workspace link."     Version="1.0.0.0"     Scope="Web"     Hidden="FALSE"     ImageUrl="Meteoriitti/Feature.gif"     ReceiverAssembly="..."     ReceiverClass="CalendarFeatureReceiver"     xmlns="http://schemas.microsoft.com/sharepoint/">     <ElementManifests>         <ElementManifest Location="Lists.xml"/>     </ElementManifests> </Feature> Lists.xml: <?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/">     <ListInstance         Title="Events" ...

Hide the SharePoint Page Ribbon - Programatically

            SPRibbon oribbon = SPRibbon.GetCurrent(this.Page);             if (oribbon != null)             {                 //hide the ribbon buttons on the wiki page                 oribbon.TrimById("Ribbon.WikiPageTab.Manage");                 oribbon.TrimById("Ribbon.WikiPageTab.Share");                 oribbon.TrimById("Ribbon.WikiPageTab.PubPageActions");                 oribbon.TrimById("Ribbon.WikiPageTab.LibrarySettings");                               //hide the ribbon menus on the webpart page                 oribbon.TrimById("Ribbon.WebPartPage.Manage");   ...

SharePoint 2010 - Hide Ribbon buttons Programatically

Hide Ribbon(whole Ribbon) SPRibbon ribbon = SPRibbon.GetCurrent(this.Page); if (ribbon != null) { ribbon.TrimById(“RibbonGroupId”); } What is this RibbonGroupId ? Well the idea is to hide all the groups in the ribbon and the whole ribbon will be trimmed. To get the id’s for ribbon groups, Open the file C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML in Internet Explorer and search for “Ribbon.EditingTools.CPEditTab.Groups The sub-nodes are the ones you’re interested in – a collection of GROUP nodes. The groups should look familiar – they correlate to the panes on the ribbon pane : o Ribbon.EditingTools.CPEditTab.EditAndCheckout o Ribbon.EditingTools.CPEditTab.Clipboard o Ribbon.EditingTools.CPEditTab.Font o Ribbon.EditingTools.CPEditTab.Paragraph o Ribbon.EditingTools.CPEditTab.Styles o Ribbon.EditingTools.CPEditTab.Layout o Ribbon.EditingTools.CPEditTab.Markup so to trim the while ribbon just use the ribbon groups like ...

Loading this assembly would produce a different grant set from other instances

Loading this assembly would produce a different grant set from other instances After installing .NET 3.5 sp1, all the MOSS web applications were working fine except for one. The following error was showing up: Stack trace: at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Web.Configuration.Common.ModulesEntry.Creat...

InfoPath - Setting Parameters on Web Service Calls when a form loads

When you have a secondary data source that uses a web service, InfoPath lets you specify the input parameters. You can set the value here to any simple data type.  However, it's not immediately apparent how you would set the value to a variable data item.  In this case I wanted to fetch some data for the currently logged in user.  This data is then used to pre-populate the form. InfoPath has a username() function.  To use this to specify the value to the web service you need to create a rule for the Form. 1.      Select Tools/Form Options. 2.      Select Open and Save. 3.      Click Rules. 4.      Add a new rule. 5.      Add an action to set a field value. 6.      For the field, select your web service as the data source and the input parameter you want to set. 7.      Set the value to a function or some other calculated valu...

The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application

Error : The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application. I am trying to create a web service that will retrieve the data from the SharePoint List Item details but when SPSite object constructor its throwing  the above exception. Solution : Then i did the following changes : 1. Publish the web service. 2. Disable all authentication except windows authentication. 3. Change the Application pool Account to Farm Admin Account

Infopath XPathNavigator

Working with XML Data Using the XPathNavigator Class http://msdn.microsoft.com/en-us/library/bb509311(v=office.12).aspx Setting the Value of a Node That Has the xsi:nil Attribute For certain data types, trying to set the value of a blank field programmatically raises the error "Schema validation found non-data type errors." Typically the cause of this error is that the element has the  xsi:nil  attribute set to  true . If you examine the underlying XML element for the blank field in the form, you can see this setting. For example, the XML fragment for the following blank Date field has the  xsi:nil  attribute set to  true . XML <my:myDate xsi:nil="true"></my:myDate> If the  xsi:nil  attribute is set to  true , it indicates that the element is present but has no value, or in other words, is null. If you try to programmatically set the value of such a node, InfoPath displays the "Schema validation found non-data type er...

SharePoint 2010 Branding

Real World Branding with SharePoint 2010 Publishing Sites http://msdn.microsoft.com/en-us/library/gg430141.aspx#Y13640 The most important source of information is the  SDK . I can’t stress that enough. There is so much more documentation with this release than there was with 2007. However, we are all in the habit of looking to each other for information first. Researching the SDK and walking through the Development classes, even if you aren’t a developer. is an important step in understanding the complex relationships between the objects in SharePoint and ASP.NET. Planning Strategy and Design Visual Design SharePoint 2010 Layered Photoshop File!  – Erik Swenson Universal Usability Guidelines The Pursuit of Interface Design Simplicity  -Luke Wroblewski Visible Narratives: Understanding Visual Organization  -Luke Wroblewski Common Visual Design Misconceptions  – Luke Wroblewski Usability 20 Do’s and Don’ts of Effective Web Design Introduction to Good Usab...