This Post has been moved to my New Blog. Please follow this link http://blog.ksenthil.net/archive/2009/07/25/promoting-properties-e28093-expose-infopath-fields-as-site-columns.aspx
Archive for September, 2008
Promoting Properties – Expose InfoPath Fields as Site Columns
Posted by kusek on September 29, 2008
Posted in InfoPath, InfoPath Deployment | Tagged: InfoPath, Promotion Property | 7 Comments »
Manage Data Connection Files – InfoPath 2007 – Universal Data Connection
Posted by kusek on September 27, 2008
After going through this article, I got to know the power of Universal Data Connection UDC files in the InfoPath forms and how it helps during multiple deployment and migration scenarios. But what I missed to note is How do I get a Data Connection File from the Central Administration Site – > Manage Data Connection. This article describes how to do that. Also below I have highlighted the points that you need to get a file from Data Connection File from the Central Administration. (Managing the Data Connection Files centrally) with few quick screen clips that will help you.
Let’s assume that you have created an InfoPath form as per this article. To recap you have added the data connection from the Data Connection Library of your SharePoint site, while doing so you will find an option called Connection Options. Click on the Connection Options and Select the option centrally managed connection Library, by this what you mean is that you are asking the Form template to get the connection file from the Centrally Managed Connection Files from Central admin.

From now on your InfoPath form template will get the Connection Setting from the UDC File of the Central Admin. In case if you want to make any changes to the connection setting all you have to do is to change the Connection File present in the Central Administration Server.

References:
http://blogs.msdn.com/infopath/archive/2006/10/02/Data-Connections-in-Browser-Forms.aspx
http://msdn.microsoft.com/en-us/library/ms772101.aspx
Posted in InfoPath, InfoPath Deployment, SharePoint | Tagged: InfoPath, Universal Data Connection | 3 Comments »
SPPropertyBag
Posted by kusek on September 23, 2008
SPWeb object of SharePoint exposes a Field called Properties which is of type SPPropertyBag a sub class of StringDictionaryIt allows you to store Key value String Data within a web
Below are some quick points that will help you in using it.
- As Mentioned Before it is a StringDictionary, which can only store String values.
- You need to call the Update() method of the SPWeb.Properties.Update() to persist the value.
- Same applies while you are removing a value from it.
- Below code gives you a quick start.
- If you want to manage this through UI. Refer this link. It’s a fantastic option you will love.
using (SPSite oSite = new SPSite(http://mysite))
{
using (SPWeb oWeb = oSite.RootWeb)
{
//Add an Item to Bag
oWeb.Properties.Add(“Your Key”,“Your Value”);
//Be sure to Call the Update Method on Properties
//If you miss this your value wont get Presisted for the
//Next Run
oWeb.Properties.Update();
// To Reterive the Value
String sMyItem = oWeb.Properties["SPPropertyBag"];
//Remove the Value
//Be sure to Call the Update Method on Properties
//If you miss this your value wont get Presisted for the
//Next Run
oWeb.Properties.Remove(“SPPropertyBag”);
oWeb.Properties.Update();
}
}
Posted in SharePoint | Tagged: SPPropertyBag, SPWeb | Leave a Comment »
SPPropertyBag
Posted by kusek on September 23, 2008
SPWeb object of SharePoint exposes a Field called Properties which is of type SPPropertyBag a sub class of StringDictionary. It allows you to store Key value String Data within a web Below are some quick points that will help you in using it. using (SPSite oSite = new { { oWeb.Properties.Add(“SPPropertyBag”,“I can Store a StringValue Here”); oWeb.Properties.Update(); oWeb.Properties.Remove(“SPPropertyBag”); oWeb.Properties.Update(); } }
SPSite(“http://mysite”))
using (SPWeb oWeb = oSite.RootWeb)
//Add a Item to Bag
//Be sure to Call the Update Method on Properties
//If you miss this your value wont get Presisted for the Next Run
// To Reterive the Value
String sMyItem = oWeb.Properties["SPPropertyBag"];
//Remove the Value
//Be sure to Call the Update Method on Properties
//If you miss this your value wont get Presisted for the Next Run
Posted in Uncategorized | 1 Comment »
SQL Server and SQL Reporting Server SSRS – Quick Reference –FAQ’s
Posted by kusek on September 20, 2008
SQL Server
- Add a Database user to a Database role:
EXEC sp_addrolemember ‘db_owner’, ‘yourdbusername’
More here
http://technet.microsoft.com/en-us/library/ms187750.aspx?PHPSESSID=rr1g5nuj29l79hrpjk7k0g1461
- When you rename the SQL Server name:
In case if you have renamed the SQL Server recently and find a trouble to connect to the server using code. Try the below items.
- Use Query Analyzer and Connect to the SQL Server.
- Execute the command SELECT @@SERVERNAME AS ‘Server Name’
- You will find the old name reflecting there.
- First run the command sp_dropserver ‘old server name’
- And then run sp_addserver ‘new server name’, ‘local’
- You should be good to go
SSRS Reporting Servers:
- To change the User Name or the Server name of the Reporting Server instance [SSRS].
- When you get rsreportserverdatabaseunavailable error when connecting to SQL Server Reporting server.
For the above case you have to use the tool rsconfig that will change the user and server details.
Posted in SQL Server 2005, SSRS | Tagged: SQL Server 2005, SSRS | Leave a Comment »
STSADM Tool Reference
Posted by kusek on September 20, 2008
This Poster will help you as Quick Reference for STSADM Command tool.
Posted in SharePoint, SharePoint Tools | Tagged: SharePoint, STSADM | Leave a Comment »
Adding Server Side code to the Publishing Page Layouts – PageParserPaths
Posted by kusek on September 20, 2008
This article is to give a brief introduction for the Functionality of PageParserPaths tag in the Web.Config file of SharePoint. (It serves as a Reference for me In future and for someone out there who is search for a similar implementation).
All the Layout pages in the SharePoint 2007 are derived from the class Microsoft.SharePoint.Publishing.PublishingLayoutPage .
This works very well for most of the cases and customization. But there will be very chance that for some reason you want the actual page instance to have a completely different class. Might be a case where you are using a third part tool or a component. In this case if you try to change the base class or put in some custom server side code in to the page layout file, SharePoint will complain you with a parser error.
This Article describes the approach that will help you to put in the code for the layout pages. It works like charm.
On additions to the above article is that in case if you are concerned about allowing all the pages having the server code as defined by below tag
<PageParserPath VirtualPath=”/_layouts/masterpage/*” CompilationMode=”Auto” AllowServerSideScript=”true”
IncludeSubFolders=”true”/>
You can make a particular page to have server side code as below
<PageParserPath VirtualPath=”/_layouts/masterpage/yourpage.aspx” CompilationMode=”Auto” AllowServerSideScript=”true”
IncludeSubFolders=”true”/>
While configuring a single page, make sure that you remove the attribute IncludeSubFolders=”true”. If you leave this tag as it is, all you are going to get is a plain HTTP 500 error code which is hard to debug. Validation that SharePoint makes here is IncludeSubFolders=”true” can be present only if the attribute VirtualPath ends with /*.
Posted in Publishing, SharePoint | Tagged: Publishing Pages, SharePoint | Leave a Comment »
SharePoint Tools
Posted by kusek on September 20, 2008
Below is the List of the SharePoint tools that will boost your productivity. I love them and use them. You too will…
Writing CAML Queries directly in C#.
CAML.NET http://codeplex.com/camldotnet
Custom STSADM command and Command to Get the Content Type Xml Schema
CUSTOM STSADM http://www.andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx
SQL like CAML Queries - My Favorite one
CAML Queries in SQL Syntax http://www.ideseg.com/SharePointYetAnotherCAMLQueryTool2.aspx
SPDisposeCheck
SPDisposeCheck is a tool to help SharePoint Developers follow memory management best practices when using the SharePoint API with IDisposable objects including SPSite and SPWeb. More Information about the tool here .
Posted in SharePoint, SharePoint Tools | Leave a Comment »
Deploying InfoPath forms Using Features – the Right Way
Posted by kusek on September 19, 2008
” This Post has been moved to my New Blog Please visit http://blog.ksenthil.net/archive/2009/07/25/deployment-of-infopath-form-e28093-the-right-way.aspx“
A week back couple of my friends was asking is there a proper way to deploy the InfoPath forms to the server, Way other than File -> Publish – > SharePoint server with or without forms server. I did a quick search and was not lucky, came to a lackadaisical conclusion that there is no other way. But whenever I deploy workflows with InfoPath form I see a new solution that adds itself to the Solution Store. By this I know for sure there is some other way to deploy InfoPath forms. First thing want I wanted was to get the Solution out of SharePoint and see what’s there inside, Again for this there is a tool through which you can do it [I lost the url from where I got it] or hardly 10 lines of code is all what you need.
To my surprise there is indeed a way to do it, well let’s see how. What I got out of that solution is a feature, what’s in it [Image speaks louder than words, image with comments even louder
] ]
Feature.xml
Element.xml
################### You are Right its again another File Provisioning in to SharePoint Lib #####################
############# Be sure to put the location as FormServerTemplates############
Here is the Stripped Out Version of the XML.

Steps in Short:
- Develop your IP form.
- Publish it to the network location as how you do to upload to the Central Administration Upload Form Templates.
- Create one Feature.xml, Element.xml as defined in the article [Sorry how workflow does
]. - Put in the IP form and create a feature out of it.
- Its all.
Posted in InfoPath, InfoPath Deployment | 3 Comments »


