Today I am facing save conflict problem when i am updating list item during itemupdating event.
I have found solution after Research.
using (SPSite oSiteCollection = new SPSite(properties.WebUrl.ToString()))
{
using (SPWeb oWebsiteRoot = oSiteCollection.OpenWeb())
{
int count = 0;
oWebsiteRoot.AllowUnsafeUpdates = true;
SPList list = oWebsiteRoot.Lists[properties.ListId];
SPListItem oItem = list.GetItemById(properties.ListItemId);
if (oItem["Request_x0020_Counter"] != null && oItem["Request_x0020_Counter"].ToString() != string.Empty)
{
count += Convert.ToInt32(oItem["Request_x0020_Counter"].ToString()) + 1;
}
else
{
count += count + 1;
}
properties.AfterProperties["Request_x0020_Counter"] = count;
}
}
Monday, April 19, 2010
Friday, April 16, 2010
PDF Convertor for SharePoint
Hi Guys,
I have uploaded word to pdf feature in codeplex. Please find attachment in source code tab in below link.
Link : http://word2pdf.codeplex.com/
I have uploaded word to pdf feature in codeplex. Please find attachment in source code tab in below link.
Link : http://word2pdf.codeplex.com/
Thursday, April 15, 2010
Programmatically update workflow history on specific list
using (SPSite site = new SPSite("http://MOSS:5858"))
{
using (Microsoft.SharePoint.SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
SPList historyList = web.Lists["Workflow History"];
SPListItem item = historyList.Items.Add();
item["Description"] = "testing";
item["WorkflowInstance"] = "{7CF46B1F-42C8-4E0A-80D3-EBEFD670AC63}";
item.Update();
}
}
{
using (Microsoft.SharePoint.SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
SPList historyList = web.Lists["Workflow History"];
SPListItem item = historyList.Items.Add();
item["Description"] = "testing";
item["WorkflowInstance"] = "{7CF46B1F-42C8-4E0A-80D3-EBEFD670AC63}";
item.Update();
}
}
Programmatically Update Hyperlink in sharepoint list
SPFieldUrlValue linkUrl = new SPFieldUrlValue();
linkUrl.Description = "Completed";
linkUrl.Url = "http://www.google.co.in"
item["WF Status"] = linkUrl;
linkUrl.Description = "Completed";
linkUrl.Url = "http://www.google.co.in"
item["WF Status"] = linkUrl;
Saturday, April 10, 2010
Monday, April 5, 2010
Errors were found when compiling the workflow.The workflow files were saved but cannot be run.
I have installed third party feature on sharepoint after that this problem is created.
Solution :
Check web.config file authorizedTypes section.
Solution :
Check web.config file authorizedTypes section.
Wednesday, March 31, 2010
Sharepoint Shortcut Name
BDC = Business Data Catalog and Backup Domain Controller
BI = Business Intelligence
CA = Central Administration and Certificate Authority
CMS = Content Management Server
DMZ = Demilitarized Zone
ECM = Enterprise Content Management
ECS = Excel Calculation Server
KPI = Key Performance Indicators
IIS = Internet Information Services
ISA = Internet Security and Acceleration Server
MMC = Microsoft Management Console
MOSS = Microsoft Office SharePoint Server 2007
O12 = Office 12
OFS = Office Forms Server
OSS = Office SharePoint Server, Office Server System and Open Source System
PDC = Primary Domain Controller
PKI = Public Key Infrastructure
RFC = Request for Comments
SPS = SharePoint Portal Server
SSL = Secure Sockets Layer
STS = SharePoint Team Services
SSP = Shared Services Provider
TLS = Transport Layer Security
URL = Uniform Resource Locater
URN = Uniform Resource Name
URI = Uniform Resource Identifier
VS = Virtual Server 2005, Virtual Server and Visual Studio
VSS = Visual Source Safe, Volume Shadow Copy Service
WA = Web Application
WAS = Web Application Stress tool
WCM = Web Content Management
WSS = Windows SharePoint Services, Web Storage System and Windows Server System
WWF = Windows Workflow Foundation and Worldwide Wrestling Federation
Subscribe to:
Posts (Atom)