Pages

Wednesday, December 16, 2009

How to open any documents in EDIT Mode from custom ASPX page

Requirement:

We need to display documents from SharePoint Document Library into custom ASPX page and when user clicks on documents, it needs to open in “EDIT” mode, by default it’s giving user prompt to open documents in “EDIT” or “READ” only mode.

Solution:


We need to put extra JavaScript code which will open document in EDIT mode.

Reference Links:

http://ddkonline.blogspot.com/2007/07/issues-with-sharepoint-2007-checkout.html

http://www.google.com/search?q=dispex+sharepoint

http://mattknott.com/content/blog/2009/08/Stop_DispEx_Redirecting.html

http://dotnetninja.wordpress.com/2009/01/12/how-to-open-sharepoint-documents-in-edit-mode-with-internet-explorer-6-and-windows-xp-without-regfix/

ERROR: The file manifest.xml does not exist in the solution package

I was getting above error when solution package size becomes too big; I need to add below lines into cab.ddf file.

.Set CabinetFileCountThreshold=0

.Set FolderFileCountThreshold=0

.Set FolderSizeThreshold=0

.Set MaxCabinetSize=0

.Set MaxDiskFileCount=0

.Set MaxDiskSize=0

Reference Links:

http://andreasglaser.net/post/2009/03/13/SharePoint-and-the-file-manifestxml-does-not-exist-in-the-solution-package.aspx

http://ph-tom.blogspot.com/2008/04/file-manifestxml-does-not-exist-in.html

Different Method of SP List Item Update

http://karinebosch.wordpress.com/walkthroughs/event-receivers-theory/

http://hristopavlov.wordpress.com/2008/05/14/uploading-a-file-event-receivers-the-file-has-been-modified-by/

Tuesday, December 15, 2009

ERROR: Cannot override the Shared Resource Provider context obtained from the Office Server. This API can be used only when an Office Server context is either internally unavailable or defined

I was getting above error while working with BDC object model; actually I have custom code which will interact with SQL Session Provider instance and try to open SSP database.

Code

SqlSessionProvider.Instance().SetSharedResourceProviderToUse(“SSPName”);

I have found out that I need to change my custom code to work properly to remove error, I got very good reference from http://blogs.msdn.com/syedi/archive/2009/05/28/populating-the-bdc-field-of-a-splistitem-from-client-application.aspx link, which provided me BDC object model code with example.

Thank you!

ERROR: The type or namespace name 'ApplicationRegistry' does not exist in the namespace 'Microsoft.Office.Server' (are you missing an assembly reference)

I was working with BDC object model and accessing BDC application definition file from my custom ASPX page, I have included correct assembly for 'ApplicationRegistry' class but still it was giving me above error, after sometime I have realized that actually it’s looking for different assembly name to be included into page.

i.e. Microsoft.SharePoint.Portal (in microsoft.sharepoint.portal.dll).

After adding Microsoft.SharePoint.Portal assembly into page, I didn’t get any error :)

 Good Job!