How to Change the Home Page / Landing Page in MOSS 2007

To Change the Home Page or Landing Page in SharePoint,

Browse to

Site Actions ->

(Look And Feel) Welcome Page – Specify your Page URL.

How to set the Interval for Alerts in SharePoint 2007

To set the timer job interval for alerts can set by using the setproperty for the property job-immediate-alerts command in stsadm.

Syntax:STSADM -o getproperty -pn job-immediate-alerts –pv <property value> -url <URL of the Site>

Example:STSADM -o getproperty -pn job-immediate-alerts –pv “every 2 minutes” -url http://uday

[…]

How to Edit InfoPath XML File in Forum Library Programmatically in SharePoint 2007

The below lines of code snippet is to update the infopath xml record(file)

SPWeb _web = SPContext.Current.Web; SPList _list = _web.Lists[“SampleFormLib”];

MemoryStream myInStream = new MemoryStream(item.File.OpenBinary()); XmlTextReader reader = new XmlTextReader(myInStream);

XmlDocument doc = new XmlDocument(); doc.Load(reader);

reader.Close(); myInStream.Close();

XmlNamespaceManager nameSpaceManager = new XmlNamespaceManager(doc.NameTable); nameSpaceManager.AddNamespace(“my”, “http://schemas.microsoft.com/office/infopath/2003/myXSD/2009-06-11T12:44:57“);

doc.DocumentElement.SelectSingleNode(“my:Status”, nameSpaceManager).InnerText = “Saved”; […]

Get Timer Job Interval for Alerts

To get the timer job interval for alerts can be retrieved by using the getproperty command in stsadm.

Syntax:STSADM -o getproperty -pn job-immediate-alerts -url <URL of the Site>

Example:

STSADM -o getproperty -pn job-immediate-alerts -url http://uday

Set Duration for New Icon Indicator in SharePoint

To Set the Duration for New icon in SharePoint (the indicator which shows next to new items) access the SharePoint WebApplication object and set the value for DaysToShowNewIndicator.

SPWebApplication WebApp = SPWebApplication.Lookup(new Uri(WebAppURL.Text));

WebApp.DaysToShowNewIndicator = 3;

WebApp.Update();

[…]

Approval Workflow goes to Infinite Loop while Editing

In SharePoint Out of the Box Approval workflow for content approval has issue while triggering workflow when the item is changed, the status will remain on “InProgress” or “Pending” even though the item is approved.

Microsoft has released the hotfix for this issue. It can be downloaded from here

Site Content Type in Use – Error while Deleting Content Type

If you get “Site Content Type in Use” error while deleting the content type.

Change the default content type for the list/library, which uses this content type.

Then try to delete the content type.

“The file has been modified by SHAREPOINT\system” Error while Updating InfoPath xml file in SharePoint Library

If you try to update the InfoPath xml file through object model in events/WebParts or through any medium.

While execting the Item.Update() will cause the below error. While updating the InfoPath xml file in ListItem the file and ListItem object getting disconnected.

Item.File.Update() will solve your issue.

StackTrace […]

Exception occurred while activating publishing feature

If you are getting the below exception while activating the publishing feature in your site.

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder) at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)

[…]

CTP of Visual Studio 2008 extensions for SharePoint v1.3

MS Released the CTP of Visual Studio 2008 Extensions for sharepoint.

The Community Technology Preview (CTP) release is available here on Microsoft Connect where customers can also report any feedback they have. It is anticipated that all existing VSeWSS 1.2 projects will work with the CTP. The CTP is not supported by Microsoft Customer Support […]