Change SharePoint Created and Modified fields

For some time I have received requests from customers to for one reason or another change some of the SharePoint system fields available in a SharePoint document library like Created By or Created field.

With that in mind I created a small utility to ease the process of changing these internal fields
This utility will allow the update of the following system fields:

  1. Created
  2. Modified
  3. Created By
  4. Modified By

Cheers, Osvaldo

One or more types failed to load error adding new SharePoint Web Application

Recently I have installed Office 2010 in one of my development VM to look at the new features availiable in terms of integration between office 2010 and MOSS2007.

The office 2010 installation was really straightforward and everything worked fine when I went back to any of my web apps but when tried to create a new SharePoint application in central administration MOSS2007 throwed the error: SPUpgradeException: One or more types failed to load. Please refer to the upgrade log for more details

To solve this I had to simply uninstall Office 2010 from the VM and perform a reboot. After that I was again able to create new web applications in my MOSS2007 VM.

office 2010 uninstall

office 2010 uninstall

Lesson learned: don’t install office 2010 in an environment with MOSS2007

Recommended SharePoint goodies: SPDActivities

SPDActivities or “Useful SharePoint designer custom workflow activities” is a must have for any SharePoint developer or administrator who wants to create more flexible workflows in SharePoint. It adds several new actions otherwise not available in SharePoint designer.

It features functionality such:

Send Email with HTTP File attachment
Send Email with List Item attachments
Start Another Workflow
Grant Permission on Item
Delete List Item Permission Assigment
Reset List Permissions Inheritance
Is User a member of a SharePoint group
Is Role assigned to User
Lookup user info
NEW! Copy List Item Extended Activity
NEW! Send Email ExtenSend Email with HTTP File attachment
  • Send Email with List Item attachments
  • Start Another Workflow
  • Grant Permission on Item
  • Delete List Item Permission Assigment
  • Reset List Permissions Inheritance
  • Is User a member of a SharePoint group
  • Is Role assigned to User
  • Lookup user info
  • NEW! Copy List Item Extended Activity
  • NEW! Send Email Extended

Check it from the official site in codeplex:

Easily Bulk import items into a InfoPath form library

So you have been given the task to create a form using InfoPath right?

After you create this fancy looking form you publish it to a SharePoint form library and configure it to be viewed using a web browser.

Your company used to capture the data using an excel spreadsheet or something similar so now you have to import all those records into the new form library from excel.

Although this looks something simply you may find it a bit more tricky than expected.

The good news:

To accomplish that you may follow this easy steps.

  1. Use the publish form wizard from InfoPath to Publish or republish your form to the form library
    image
  2. Make available as columns all fields that you want to edit using the datasheet view
  3. Enable those fields to be editable from the datasheet view or proprieties page by checking the appropriate checkbox
    image
  4. After you finish the InfoPath publish wizard go to the form library to fill a new form. Open it and save without changing any values (The purpose of this is to create the initial record in the form library).
    image
  5. back to the form library open the library in explorer view copy the form to a local folder and use CTRL + C and CTRL + V multiple times (If you select multiple files and copy and past to the same folder you will be able to generate multiple files at the same time) After all files generated select all and copy them back to the form library using the explorer view. The purpose of this is simply a quick way to generate multiple files. The form library will always require that an xml file exists for each form.
  6. In the form library create a new view in datasheet mode. Select only the fields that you have created in the step 2 to be displayed. Call this new view BulkImport or whatever
    image

Replace text in InfoPath using rules

I have been using InfoPath forms services in MOSS to build enterprise level forms.

InfoPath forms services when combined with the power of SharePoint designer workflow and the built-in SharePoint capabilities is the perfect solution for such type of forms.

The Problem:

One the flaws/difficulties I found was was the nonexistence of a replace text function in the accessible from InfoPath rules. Of course one could always use vb.net or c# to accomplish this which in turn lead to other situations where for example the form would have to be deployed at the server level.

The Solution

Create a replace text web service.

Create a very simple web service that receives three parameters (Original Text, Old Text, New Text)
image

    [WebMethod]

     

        public string replaceText(string OriginalText, string OldText, string NewText) {

     

            return OriginalText.Replace(OldText,NewText);

     

        }

     

    image

Add this web service as a secondary data source and set to not load automatically

image

image

Create a rule to call the web service and assign the result to a field

  1. Assign input parameters to the external data source parameters fieldsimage image

  2. Use the action query using data connection to call our web serviceimage

  3. Assign the result of the web service call to the desired fieldimage

Test and deploy

SharePoint BI Offering

Since January this year we have this hit by the news that microsoft will not continue to develop PerformancePoint server as a standalone product. It will be include instead in the future developments of MOSS making this way SharePoint

VS 2008 Compatibility with Older VS 2005 Add-in Packages

I’ve helped a few people over the last week who have run into issues with VS 2008 where it would immediately crash when the IDE was launched, or upon creating new projects (usually failing with a “Visual Studio has encountered an unexpected error” dialog).

After debugging the issues, it turned out that they were caused by an older VS 2005 add-in that people had installed on their machines that wasn’t compatible with VS 2008.