Monday, December 17, 2012

New ClearPeople blogsite

Please follow our new blogsite: http://blog.clearpeople.com/

Saturday, April 17, 2010

SharePoint 2010 has been Released To Manufacturing (RTM)!

Approx 2 hours ago, SharePoint 2010 RTM was announced. I have posted full details over on the SharePoint 2010 Blog: http://sharepoint-server-2010.blogspot.com/2010/04/sharepoint-2010-rtm-is-out.html

Monday, March 8, 2010

SharePoint InfoPath Fix

Here’s a simple, although tedious, fix to a SharePoint InfoPath problem I came across while working at a client site.
I began to notice that when publishing to any of the organisations three servers, if I add a new field to a form, or even modify the schema in the slightest, SharePoint ‘loses’ the content of the cells.
After looking into the problem a bit, it seemed that the cause is that site columns become duplicated during the publishing of an Infopath Form to Forms Services using the InfoPath Publishing Wizard.

The best way to handle this problem is to use Sharepoint Manager 2007 to identify duplicated site and list columns for the Infopath Form list.

The columns being used by a published Infopath form can be identified by opening the Manifest.xsf for the Infopath form and comparing the columnId values to the Id values obtained by using Sharepoint Manager 2007...see, not too bad!



From here, you need to delete the duplicated site columns using the SharePoint site column administration web page.

And also delete the duplicated list columns on the Infopath Form list using Powershell. Just make sure that all the read only columns are set to ‘false’.




For my specific problem, I used the following Powershell.
function Delete_SPFields_From_SPList_Forced([string] $ServerName, [string] $ListName, [string] $FieldGUID){
$spsite = new-object Microsoft.Sharepoint.SPSite($ServerName + $SiteCollectionName);
# Open A Subsite Of The Site Collection. $web = $spsite.RootWeb; $list = $web.Lists[$ListName]; $fieldCollection = $list.Fields; $guid = new-object System.Guid($FieldGUID); $field = $fieldCollection[$guid]; Write-Host “Removing $field $FieldGUID from $Web $ListName” $field.ReadOnlyField = $false; $field.Update(); $fieldCollection.Delete($field.InternalName); $spsite.Dispose();
}
To delete the following fields.
Claim Date 8b4ddc90-5190-4235-bda4-b46ca6c061b1Claim Grand Total 64a160d0-ee6d-4d8f-b383-e5eaf11ecc6fClaim No 83d5c76c-4520-4045-a819-b47bac301e95Claim Status 1db7b23f-e971-447b-b47f-59d9dc6d143cClaimant Name f004b61e-8cea-4fdc-a415-43a42097f751Mdr StaffNo 1f26b5b5-0b71-4ea4-94ee-77ed5ded220c
And all was then good!
Useful references during the trouble-shooting.

http://www.delphi-ts.com/blogs/lozzi/post/2009/06/03/Duplicate-site-columns-in-MOSS-from-InfoPath-Forms.aspx
http://blumenthalit.net/Files/PowerShell%20Scripts/Delete-SPField.ps1
http://pholpar.wordpress.com/category/custom-fields/

Also, if this helped, let us know!

Tuesday, October 6, 2009

digitally signing an Infopath Form Template so that it can run as Full Trust

Richard has been working on an InfoPath/SharePoint project recently, and his tip relates to digitally signing an Infopath Form Template so that it can run as Full Trust.

An Infopath Form needs to run at Full Trust when Managed Code is added to the form. http://msdn.microsoft.com/en-us/library/bb251020.aspx.

To avoid purchasing a code-signing certificate you can issue a self-signed certificate. You need to make sure that the certificate that you request is a code-signing certificate. And to do this you need to enable code-signing in the certificate authority. http://www.thorprojects.com/blog/archive/2007/06/30/domain-certificate-authority-signing-infopath-2007-forms.aspx.

So far so good. The problem that I have experienced is that the certificate that is received is not trusted. And so additional steps are required to make the certificate trusted. If you do not do this then the certificate will not be available to sign the Infopath form.

Export the self-signed certificate from the Personal\Certificates node. Select both the Cryptographic Message Syntax Standard – PKCS #7 Certificates (.P7B) and Include all certificates in the certification path if possible options on the Export File Format page.

Import the exported self-signed certificate into Trusted Root Certification Authorities\Certificates node.

At this point you can sign the Infopath form. http://office.microsoft.com/en-us/infopath/HP101636661033.aspx

Monday, April 13, 2009

"Checked out to me" report across SharePoint Site Collections and WebApps

Ever wondered how to view all documents checked out to you across your SharePoint farm (so across multiple Site Collections)? The following will without any custom coding provide you with a way to search for documents that have been checked out to a specific user using standard SharePoint search indexing and features.

Below you will add a new Managed Property which maps to the list meta data field holding the name of the user the item has been checked out to. You will then do a full crawl, and finally modify your Advanced Search to allow a user to search for documents checked out to the user, or to any other user for that matter.

  • Create a new Managed Property
    - Go into Shared Services
    - Go to Search Administration, Metadata Properties
    - Click to create “New Managed Property”
Use the following details:

Property name: CheckedOutTo
Type: Text
Mappings: add mapping to "ows_CheckoutUser(Text)"



  • After adding the new managed property, start a full crawl of the relevant content source

At thsi point you could go back in and verify if any items have been indexed (click on the managed search property and check the status of number of indexed items containing a value for this property). If zero, then there are no checked-out documents.

You are now ready to prepare the SharePoint Advanced Search to include an option to search for documents that have been checked out to a user:

  • Go to a Site Collection with Advanced Search, and edit your Advanced Search page
  • Modify the Advanced Search web part to include the new property as a selectable search property by adding two new entries in the properties XML for the Advanced Search Box webpart:



    The properties XML should now include the following new entries:

    In the PropertyDefs section add:
    PropertyDef Name="CheckedOutTo" DataType="text" DisplayName="Checked out to"

    And in the section ResultType DisplayName="All Results" Name="default", add
    PropertyRef Name="CheckedOutTo"
After saving these changes to the properties, your Advanced Search page should now include a new selectable property displayed as “Checked out to”:


Select the new property, enter the full name of the user (e.g. "Joe B. Loggs") and hit "Search". If the user has any documents checked out, then you should see them coming up in the results.
This is a method that is useful when not wanting to utilise any custom code or third party components.
Let me know what you think or if you find this useful. Comments always welcome.

Gabriel




Standard "Checked out to me" report

This report for some reason escaped my attention until recently when a client prompted me to look for it.

So...
1) Go to the root site of a Site Collection (not all site collection templates will include this)

2) From “Site Actions”, choose “View Reports” and “Checked out to me”.

Very useful!

Only problem is that it only shows the report for one single Site Collection.

Another blog is being posted in a bit showing you how you can create a search across all Site Collections (and Web Apps) for document that have been checked out to you, or anyone else for that matter. (click here read the next post here)

Enjoy this tip... I know I did ;-)

Gabriel

Monday, March 30, 2009

VSeWSS 1.3 - all DLLs have to be accessible

This tool or extension has some unexpected behaviour :


When you create a deploy package all the DLLs that your project references have to be accessible .... this is normal so far.

But, the problem is that all the DLLs referenced by your directly referenced DLLs also have to be accessible.

The immediate (and obvious) way to solve this problem is to copy these DLLs to the GAC (not so great in large scale production deployment scenarios). However we have found that you can also fix the problem by copying the DLLs to the server side VSeWSS "bin" folder (i.e. the VSeWSS extension has a small web application that generates the wsp for you) which typically resides in “C:\Program Files (x86)\Microsoft SharePoint Developer Tools 9.0\svc\bin”.

Hopefully the tricks above will work for you, but let us know if you have any better work-around or better practice for solving this particular problem ;-)

CAML query - getting more than 10 results

Another thing you should keep in mind when you use CAML QUERING is the fact that by default the query is going to return just the first 10 result so you should specify the maximum number of row that you want the query return to you, you achieve this with the tag : <Range><StartAt>1</StartAt><Count>10000</Count></Range>

 

Using the example above to get 10,000 results your query could look like this:

 

<Query>

   <Where>

      [.....]

   </Where>

  <Range>

    <StartAt>1</StartAt>

    <Count>10000</Count>

  </Range>

</Query>

 

Useful to use this parameters to page results.

 

Another CAML (tip) from Miguel ;-)

 

CAML query with more than two conditions

CAML queries seem to have a weird restriction that prevents you from using more than 2 conditions in a row. For example, this query doesn’t work:

 

<Query>

   <Where>

      <And>

            <Eq>

               <FieldRef Name='Title' />

               <Value Type='Text'>A</Value>

            </Eq>

            <Eq>

               <FieldRef Name='_UIVersionString' />

               <Value Type='Text'>B</Value>

            </Eq>

           <Eq>

              <FieldRef Name='FirstName' />

              <Value Type='Text'>C</Value>

           </Eq>

      </And>

   </Where>

</Query>

 

In the above you will notice that there are three “AND” conditions (the <Eq>’s) in a row so we need to wrap the condition in groups of two and nest the conditions like this:

 

<Query>

   <Where>

      <And>

         <And>

            <Eq>

               <FieldRef Name='Title' />

               <Value Type='Text'>A</Value>

            </Eq>

            <Eq>

               <FieldRef Name='_UIVersionString' />

               <Value Type='Text'>B</Value>

            </Eq>

         </And>

         <Eq>

            <FieldRef Name='FirstName' />

            <Value Type='Text'>C</Value>

         </Eq>

      </And>

   </Where>

</Query>

 

Miguel figured this one out recently and kindly shared.....

Welcome to Tips for SharePoint

Traditionally (and now I am talking a few years), good SharePoint documentation was scarse and hard to come by. This has changed somewhat. Better books are available, there are better best-practices, and Microsoft's own documentation is even getting better.

So .... this blog site is really just our developers' way of logging some of those tips and tricks that we have come across, and some of those we have come up with ourselves.

Feel free to contribute with your comments, tips and tricks. Obviously if you find a trick to solve a particular problem that is better than any that we might provide - shout!!!

So.... Welcome to Tips for SharePoint, from The SharePoint People