Showing posts with label InfoPath with SharePoint 2010. Show all posts
Showing posts with label InfoPath with SharePoint 2010. Show all posts

Saturday, December 4, 2010

SharePoint 2010: Using Visual Studio 2010 to Create a List Definition and List Instance (Based on a new Content Type)

In order to programmatically add a new list definition and instance based on a new content type, you will need to expand upon the solution/project created in the content type post. Right-click the project and select Add New Item. The Add New Item dialog appears:

Select List Definition from Content Type, enter a name, and then click Add. The SharePoint Customization Wizard appears:


Enter an appropriate display name for the list definition and select the content type from the drop-down. The drop-down will only show the content types that are being defined within the current solution. Leave the Add a list instance checked if you want the deployment of the solution to create the actual list. Click Finish.
The list definition elements file is opened. Add Unique=”TRUE”. The Unique setting means that the list instance will be created once and there is no need to show this definition to the users moving forward:

Expand the ListInstance1 item in the Solution Explorer and click on the Elements.xml underneath. This defines the instance of the list (or document library). Change the title to determine the name of the list instance. If the list will be a document library, modify the URL setting by removing the “Lists/”. Enter a name without spaces for the URL. Enter an appropriate description:

Save all of the changes to the files.

Right-click the Project in Solution Explorer and select Deploy. The content type package is built and added to the SharePoint farm solutions. The solution is deployed globally as a feature that is available at the site level. The site feature will be activated at the root site collection but may not be activated within other sites. The site columns, content type, and list (document library) are created accordingly on the root site.


If you found this useful, please help support my SharePoint and .NET user group (Philly SNUG) by clicking on the logo below.

Friday, November 26, 2010

InfoPath Holiday Poem

InfoPath with SharePoint 2010 Holiday Poem

Twas the night before deployment, when all through the farm,
Not a service was stirring, not even an alarm*.
The forms were all published to a network location with care,
In hopes that the Admin will map a drive there.

The secondary data sources were all snug in their connection,
While the Secure Store Service provided protection.
And the assembly all built, and placed in the cache,
Had just settled strong names with keys to match.

When out on the farm there arose such a clatter,
I sprang from the VM to see what was the matter.
Away to the Windows Server, I remoted like a flash,
Tore open the Services and threw up the GAC.

The XML in the manifest and the method it knows,
Gave access to instantiate the objects below.
When, what did my wondering eyes see in the tools,
But picker controls and several “If” rules.

With a little rule driver, so lively and gay,
I knew in a moment it was hacked from the SDK.
More rapid than eagles the Conditions they came,
With dialogs and Actions that called them by name!

“Is Blank! Is Not Equal To! Is not a URL!”,
Setting a field’s value was all blown to hell.
“Begins with! Contains! This Field Changes!”,
Submit will not work with values in these ranges.

As workflows that before the wild tasks did fly,
When they meet with an obstacle,  we just mount a new drive.
So up to the production server they flew,
With an XSN full of schemas, and a DLL too.

And then, in a twinkling, I heard on the prompt,
s-t-s-a-d-m someone did stomp.
I tried to be quiet, I tried not to yell,
“hey, now you can do that using PowerShell…”.


We added the template and with the .wsp,
Deployed the solution at a quarter-til three.
They asked if in a dilemma, what should they do?
Just pick up a copy of “InfoPath with SharePoint 2010 How-To”**!

Happy Holidays!!!

Steve Mann



*another word for alert since alert doesn’t rhyme with farm

**Release Dates
Europe – Dec 3rd
USA and Japan– December 13th
Canada – December 14th

Matched Content