Tuesday, May 5, 2009

How to send document to record center programatically in MOSS 2007 ?

Here is the code to send document programatically in MOSS 2007. The below code can be used in console/win apps - but in the SharePoint box because of using SharePoint Object Libraries

private void SendDocumentToRecordsCenter()
{
try
{
string MoreInfo= string.Empty
OfficialFileResult Result;

SPSite mySite = new SPSite("http://ServerName");
SPWeb myWeb = mySite.OpenWeb();

SPFile myDoc = myWeb.GetFile("LibreryName/Doc1.docx");

Result =
myDoc.SendToOfficialFile(out MoreInfo);

Console.WriteLine("Result after execution: " + Result);
}
catch (Exception ex)
{
Console.WriteLine("Error - " + ex.ToString());
}
}

Error in MOSS 2007 Record Center Site : "The Record Center is not properly configured for this request"

I have received the error message when i try to push a document from a MOSS site collection to the record center of the server farm.

"The Record Center is not properly configured for this request."

After a hell lot of investigations, i have found that the URL used for configuring the record center in the server farm was wrong.

It should be like
http://< Site DNS or Server Name >/<Record Center Site Name >/_vti_bin/officialfile.asmx

</ SharePointCoder>

Monday, May 4, 2009

Best practice for building SharePoint Solutions

For any SharePoint solution project, I stongly recommend prototyping before writing the complete code. We have been successfull with our prototyping approach. Prototyping helps us to get the user feedback and gives room for more successful delivery of the solution to meet the business requirement.

If we are not able to achieve some functionalities out of the box in SharePoint, we can go for customization using ASP.net code or third party components.

How to customize application master page in MOSS 2007

Here is a way how to use the site master page in application pages like settings.aspx in MOSS.

http://superbranding.codeplex.com/

Master Pages and Page Layouts in MOSS 2007

This is worth reading SharePoint Developers...
Approaches to Creating Master Pages and Page Layouts in SharePoint Server 2007