Wednesday, December 2, 2009

Edit Document from MOSS 2007 with Office 2003

I had a case with customer (who uses Office 2003 ~4000 PCs and approximately 150 computers with Office 2007) where if the users try to open office document from MOSS 2007 with Office 2003, the file is always opened as read only. Our custom application needs to open the doc for edit and check it out. So, the result were – it is not supported by Office 2003.

What is supported and what not, is described here

Finally, after customization of CORE.JS we succeeded to run Office 2003 to work as 2007 and these steps are described below :)

In the beginning I need to say, that this blog post were very important, regarding the chosen technical approach

1. I created empty file in the following path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033\Checkout.JS

2. I got the code of DispDocItemEx function from CORE.JS file (in the same folder) and paste it inside the new one

3. In Checkout.JS I modified the code:

Original:

================

else

    {

    fRet=stsOpen.ViewDocument2(window, szHref, szAppId);

    }

================

Modified:

================

    else

    {

    if (ctx.isForceCheckout==true)

    {

    fCheckoutForEdit=confirm(L_ConfirmCheckout_Text);

        if (fCheckoutForEdit==true)

        {

        CheckoutDocument(ctx.HttpRoot, szHref, null);

            fRet=stsOpen.EditDocument2(window, szHref, szAppId);

            }

       else

       fRet=stsOpen.ViewDocument2(window, szHref, szAppId);

    }

    else

    fRet=stsOpen.ViewDocument2(window, szHref, szAppId);

    }

==================

4. I created a copy of C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL\default.master with name custom.master

5. Added the following code just after the red line

<SharePoint:ScriptLink language="javascript" name="core.js" Defer="true" runat="server" />

<!-- Checkout JS customization BEGIN -->

<SharePoint:ScriptLink language="javascript" name="Checkout.js" Defer="true" runat="server" />

<!-- Checkout JS customization END –>

6. I uploaded custom.master into http://myportal/sites/mysitecollection/_catalogs/masterpage, published and approved the new file.

7. The next step were to configure the site to use customized master page

clip_image002

8. During the tests I found, that if I click on the file link (in document library page /AllItems.aspx) Office 2003 has the same behavior as Office 2007.

clip_image002

clip_image002[7]

The file is checked out, “Shared workspace” pane is opened and on document close the following windows appear

clip_image002[9]

But, here I want to make a note, that if you try to open a document in any other fashion (such hyper link in email or web page), the CheckIn-CheckOut menu items and/or TaskPane functionality may not be available or work as expected. This modification only affects the behavior of the document library page.

Saturday, November 14, 2009

Developing with Office 2010 Services

Visio Services:

Get Microsoft Silverlight

Access Services:

Get Microsoft Silverlight

Excel Services:

Get Microsoft Silverlight

Word services:

Get Microsoft Silverlight

Sharepoint 2010 Developer Resources

SP2010

The first place, which you need to visit before starting Sharepoint 2010 development is here. Clicking on the modules from the right side bar you will have an access to related HOL (see below) and code snippets from Paul Andrew’s blog 

What’s new in Sharepoint development  with VS 2010 (Beta 2)

What’s new in Sharepoint Foundation 2010 

What’s new in Sharepoint Server 2010

Sharepoint 2010 Developer Hands-on-labs (download): Series of 10 HOL, which covers:

  • Web parts development
  • List definitions and Event receivers
  • Using LINQ for Sharepoint
  • Using Client OM and REST
  • Business Connectivity Services (BCS) External Content Type
  • Sharepoint 2010 workflow
  • Developing UI and Silverlight
  • Sandboxed solutions
  • UI Ribbon and dialogs development

Sandboxed solutions - Sandboxed solutions run in a secure and monitored process that has limited resource access

Extending Sharepoint tools in Visual Studio 2010 - You can create extensions for projects, project items, define your own project item types and create deployment extensions.

Feature and Package designer

Visual Studio 2010 and Sharepoint 2010 (drill down and navigate through the content categories)

Peter Jausovec’s blog (http://blogs.msdn.com/vssharepointtoolsblog/)

Monday, November 9, 2009

SUGBG (Meeting 7): No-code solutions with Sharepoint 2007

When: 11 November 2009, 18:30

Where: Microsoft Bulgaria office (Sofia, Blvd.”Nikola Vaptzarov”, 55)

Session 1: Enhance Sharepoint with no-code solutions

Speakers: Esad Ismailov, Miloslav Shulev and Veselina Evstatieva (BNP Paribas)

Download the presentation

Session 2: Enabling SharePoint business users: iTechnology Forms Accelerator and K2

Speaker: Petya Gaitanska (iTechnology)

iTechnology presented their fantastic product iTFA. They demonstrated the Silverlight form designer, the rules editor, integration with K2 workflow and answered all questions from SUGBG members. The very important notice here is: iTFA is free! Download and test from here (needs registration).

For more info (in Bulgarian) visit www.sugbg.org

Thursday, October 15, 2009

SUGBG (Meeting 6): Sharepoint for ASP.NET Developers

When: 21 October 2009, 18:30

Where: Microsoft Bulgaria office (Sofia, Blvd.”Nikola Vaptzarov”, 55)

Session: SharePoint for ASP.NET Developers

Level 200

Speaker: Radi Atanasov, Architect, Abilitics

For mo info (in Bulgarian) visit www.sugbg.org

Download the presentation

IMAGE_130

Wednesday, October 7, 2009

Sharepoint - InfoPath Error - “Some rules were not applied”

Yesterday evening I had a very strange problem with InfoPath form. When I tried deploy it to Sharepoint production farm I received the error that “some rules were not applied”. The same form worked perfect when I tested in InfoPath client against the same Sharepoint deployment. It is very important to say, that I’m using a call to UserProfileService and GetUserProfileByName operation. The production farm consist of three WFE and we found the following exception in the log:

w3wp.exe (0x15D8)                       0x17A8 Forms Server                     Forms Services Data Objects       13zh                Exception            System.Net.WebException: The remote server returned an error: (401) Unauthorized.     at System.Net.HttpWebRequest.GetResponse()     at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.GetResponseHelper(WebRequest request, DataAdapterTimer dataAdapterTimer, DataAdapterCredentials credentials, Stopwatch timer, ExecWebRequestExceptionState state, String adapterName, Boolean isQuery)     at Microsoft.Office.InfoPath.Server.SolutionLifetime.WebServiceHelper.ExecWebRequestSync(XPathNavigator inputSubDOM, Boolean[] inputUseDataset, XPathNavigator resultsSubDOM, Boolean resultUseDataset, XPathNavigator errorsSubDOM, Uri serviceUrl, Uri soapAction, Int64 timeOutMillisec, Solution solution, Document document, String name, Boolean isQuery, DataAdapterTimer dataAdapterTimer, DataAd...

Server platform: Windows Server 2003 x64, SP2

The solution:

Check http://support.microsoft.com/kb/926642 (Method 2: Disable the authentication loopback check) and add DisableLoopbackCheck key on each WFE.

After reboot it works!

Thursday, September 24, 2009

SUGBG (Meeting 5): Business Intelligence with PerformancePoint Server and MOSS 2007

When: 30 September 2009, 18:30

Where: Microsoft Bulgaria office (Sofia, Blvd.”Nikola Vaptzarov”, 55)

Session: Business Intelligence with PerformancePoint Server and MOSS 2007

Level 200

Speaker: Yordanka Dragieva, Consultant

For mo info (in Bulgarian) visit www.sugbg.org

Download the presentation

IMAGE_129

IMAGE_126