Deploying SharePoint Solutions with Task Scheduler |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Kathryn Bartlett
Task Scheduler is a lifesaver when it comes to deploying code late at night. Instead of having to be directly in front of your computer, dead tired, going through the simple steps up adding/deploying/upgrading wsp files, we can write a PowerShell script that will run at a specified time. There are three steps that are involved to make this work correctly:
1. Create a PowerShell script
2. Create a batch file to run this PowerShell script
3. Create a new task in Task Scheduler that runs this batch file.
Note: The deployment code in this blog is taking place in a single-server installation of SharePoint 2010.
Create a PowerShell Script
First, we need to create a PowerShell script that will contain all of our commands. Open your favorite text editor, and save the file to your C:\ drive as psscript.ps1. As our first line, we need to add the SharePoint PowerShell snap-in with the following:
|
|
|
|
Programmatically Access Project Information in Project Server 2010 |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Yi Fan Tang
Although Project Server 2010 sits in a SharePoint 2010 site collection, it has its own database to store project data. Only Page Detail Pages and project sites are stored in the SharePoint content database. Project Server 2010 API has some out of the box web services that help you access project information programmatically. Today I am going to show you how to get some basic information and status of all the projects in the project server, such as, project ID, project name, project site, current stage, etc.
Basically, we need two web services to do this, the “LoginWindows.asmx” and “Project.asmx”. The addresses are:
http://ProjectServerURL/_vti_bin/psi/LoginWindows.asmx http://ProjectServerURL/_vti_bin/psi/Project.asmx
The “LoginWidows” web service gives you a “CookieContainer” to maintain a state in the “Project” web service. The “Project” web service is used for accessing the projects’ information.

In the “Project” web service, there is method called “ReadProjectList()” which returns a list of projects in the project server. Now the tricky thing is this method only returns very little information of the projects, for example, the project IDs and project names. If you want to get more information, you have to use the “ReadProject” method. However, “ReadProject” method requires the pro... |
|
|
|
SharePoint 2010 Site Templating using only C# (part 1): Feature Activation, quick launch links and tricky List Templates |
|
| Ranked
0
out of 5.
Rate This Post! | | | | | |
By: Philip Stathis
Here is a list of some common customizations to a site template that one would come across:
How do I activate a site collection feature programatically?
There are a few ways to do this; the way I find most intuitive is by using the display name of the actual feature you are trying to activate. The following code snippet shows this process:
public static void SiteFeatureActivate(SPSite site)
{
List<Guid> list = new List<Guid>();
foreach (SPFeatureDefinition featuredef in site.WebApplication.Farm.FeatureDefinitions)
{
if (featuredef.DisplayName == "Branding_Bra... |
|
|
|
Custom Views for Multiple Content Types within a Single List |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Kathryn Bartlett
In this example, we have two custom content types based off the Event list content type: (1) “Event Type 1”, with single line text fields “Column A” and “Column B”, and (2) “Event Type 2”, with single line text fields “Column Y” and “Column Z”. Create a Calendar, “Sample Calendar”, and add these two content types to the list. After creating an event of both content types, we see that the add, edit, and display forms all act as we would hope – only columns in that content type appear.

Figure 1 - Add/Edit Event Type 1

Figure 2 - Add/Edit Event Type 2

Figure 3 - View Event Type 1

Figure 4 - View Event Type 2
However, we may not need the Category, All Day Event,... |
|
|
|
Using SharePoint on an iPad |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Neil Barkhina
A common question I get from clients is what is “what is the experience of using SharePoint on an iPad?”. So I decided to write a blog post on that very topic. I recently purchased an iPad and was curious as to how I could use this device to work with SharePoint. That being said, my main computers are still PC’s and I use a Windows Phone, but as a person who works in technology it’s difficult to ignore the iPad as a device since it is getting a lot of buy in not just in the consumer space but also in the enterprise. What I found is that you can actually get by with an iPad, and while the experience isn’t as elegant and integrated as it is on Windows Phone, I was still able to use most of the functions of SharePoint.
Safari
The browser experience I found was a bit lacking. Though the site will render, interacting with the Ribbon and Grids did give me a lot of problems. As an example, just clicking on documents sometimes doesn’t register so what you have to do is actually click and hold a link and then click on open. Office web apps I found were decent for viewing but not so much for editing. Excel Services ran pretty will with Slicers and pivot charts.
Another grievance is Safari doesn’t save user credentials for windows authentication. This brings me to my next recommendation of using 3rd party Apps
Third Parties
The best experience I found was by using 3 apps from the App store: SharePlus, QuickOffice HD, and Pages. One of the nice things about SharePlus is that it will store your credentials so that when you go to any SharePoint Library or Document you can click on “View in web” which will go to the SharePoint site via Safari and use your stored credentials which is really nice: |
|
|
|
Workaround for People Picker Post back Bug in ASPX pages in SharePoint 2010 |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
(a.k.a: why is this people picker breaking my form when I do more than one postback?!)
By: Philip Stathis
The People Picker is a great tool to present and validate data from SharePoint users and, indirectly, the Active Directory and is a valuable asset to any custom ASPX page.
The problem is, in all of its implementations across default SharePoint pages, the forms being used only appear on load and then get submitted. This process does only one post back. If you create a form with multiple people pickers like this one:

The user needs to be able to navigate this form while having set all these values in the people pickers and the viewstate would ordinarily be enough to handle that.
This is not the case.
NOTE: this was part of the August 2011 CU for SharePoint 2010 as can be seen here.
So if installing this CU is not an option, or this technique is applicable to you, here’s my work round:
Add this variable to your aspx page:
|
|
|
How Project Server 2010 Store Custom Field Values |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Yi Fan Tang
Project Server 2010 comes as a web application to a SharePoint 2010 Farm, along with a service application for provisioning and managing. Although it is a web application, large part of the data are not stored in the web application’s content database. They are stored in a separated database created during the provision of the project server web application. I will use the custom fields as an example to show briefly how Project Server 2010 stores the data in that database.

Basically, a custom field value for a project will involve four tables, the project field values table, the custom fields table, the lookup tables table and the lookup tables values table. The following table shows the roles of each table.

The following diagram shows the relationship of all the four tables.

The “Project Field Values” table only stores the custom field values. If the custom field is a look up field, the “Project Field Values” table stores the lo... |
|
|
|
Content Syndication Hub Content Types Not Appearing |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Robert Christ
Can’t subscribe to your content types? You’ve gone through all of the steps of setting up a managed metadata service, publishing the content types on the syndication hub, and running the timer jobs, but can’t consume the content types?
Was your consuming site made from a blank template?
If so, you need to run
stsadm -o activatefeature -id 73EF14B1-13A9-416b-A9B5-ECECA2B0604C -url http://toplevelsiteurl
This is apparently because the TaxonomyFeatureStapler feature does not include the Blank Site template.
Credit goes to Phil Childs for the original discovery (http://pacsharepoint.com/2010/06/content-type-publishing-option-missing.html). Hopefully we can get this information reblogged more insistently, as numerous clients I’ve worked with have run into this problem at least once, and not been able to find the solution.
Hope this helps some of you out there?
By: Robert Christ ... |
|
|
|
Connecting a WCF Service to an InfoPath Form |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Kathryn Bartlett
When you are connecting a WCF Service to an InfoPath form and happen to come across the following error:

To resolve this, you need to do the following two steps:
1. Enable cross-domain access for InfoPath Forms
2. Store the data connection in a UDC file on your SharePoint site.
Enabling Cross-Domain Access
Go to “General Application Settings” in Central Administration and click on “Configure InfoPath Forms Services”.

Check “Allow cross-domain data access for user form templates that use connection settings in a data connection file”

|
|
|
|
Sites vs. Site Collections |
|
| Ranked
5.0
out of 5.
Rate This Post! | | | | | |
By: Neil Barkhina
Part of being a SharePoint solutions architect means designing a solution based on technical, maintenance and governance requirements. One of the most important initial design questions that I have to take into consideration is whether to recommend Sites or Site Collections for a solution. So for this blog I wanted to outline the reasons for each approach as well as a list out the pros and cons.
Sites
Size
The biggest factor in choosing to go with sites is size. A single site collection cannot span multiple content databases. Microsoft recommends that a single content database should not grow beyond 200 Gigabytes. This isn’t a hard limit, and with expensive hardware (Disk sub-system performance of 0.25 IOPs per GB. 2 IIOPs per GB) you can go up 4 TB however 200GB is the best practice for optimal performance and reasonable backup procedures. That being said, it really depends on the type of site that you are designing. For an internet facing site, a single site collection can work great. However for an enterprise portal and document management system that will service thousands of users and multiple departments, multiple site collections is usually the better approach since 200GB is a drop in the bucket these days.
Master Pages
When making the decision to do multiple site collections, there are some tradeoffs to be aware of. Without the use of custom code, a master page cannot span multiple site collections. Any highly branded site would usually have a custom Master page. Master pages are like the skin of the site and define its look and feel as well as layout. That being said, by developing a custom feature you can have a unified master page across multiple site collections however makin... |
|
|
|
| | | | | | | |