Showing posts with label SPWEB. Show all posts
Showing posts with label SPWEB. Show all posts
Friday, October 26, 2012
Tuesday, January 26, 2010
How to get current status of workflow from SharePoint object model
Reference Link:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowstatus.aspx
Sample Code:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowstatus.aspx
Sample Code:
//Obtain a list item
SPWeb thisWeb = SPControl.GetContextWeb(Context);
SPList issuesList = thisWeb.Lists["Customer Issues"];
SPListItem myItem = issuesList.Items[0];
//Get the workflow status value
int WorkflowStatusValue = myItem["MyWorkflow"];
string WorkflowStatusString = System.Enum.GetName
(typeof(SPWorkflowStatus), WorkflowStatusValue);
StatusLabel.Text = "The current status of the workflow is: " +
WorkflowStatusString;
Labels:
custom workflow,
How to get current status of workflow,
How to get current status of workflow from SharePoint object model,
MOSS 2007,
SharePoint,
SharePoint List,
SharePoint Object Model,
SPList,
SPListItem,
SPWEB,
SPWorkflowStatus,
status of workflow,
System.Enum.GetName,
visual studio workflow,
Visual Studio Workflow - SharePoint
Sunday, July 26, 2009
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I have written web service program to fetch all list names from web application, in that case I was getting access denied error while retrieving Title of SPWEB object.
Error:
at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at 'SPWEB.Title' threw an exception of type 'System.UnauthorizedAccessException'
I have found that my current user don’t have access rights to access some of the sites, after giving required access rights my web service program gave me correct output without any errors.
:)
Error:
at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex) at 'SPWEB.Title' threw an exception of type 'System.UnauthorizedAccessException'
I have found that my current user don’t have access rights to access some of the sites, after giving required access rights my web service program gave me correct output without any errors.
:)
Labels:
Access is denied,
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)),
Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException,
MOSS 2007,
Personal Experience,
SharePoint,
SharePoint Object Model,
SharePoint web services,
SPWEB,
UnauthorizedAccessException
Subscribe to:
Posts (Atom)