.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Update Task properties in updatetask1_MethodInvoking

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :SharePoint

        public Guid updateTask1_TaskId1 = default(System.Guid);
        public SPWorkflowTaskProperties updateTask1_TaskProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();   
        private void updateTask1_MethodInvoking(object sender, EventArgs e)
            updateTask1.TaskProperties.Title = "New Title";
            updateTask1.TaskProperties.Description = "New Description";

I've searched and searched and heard a lot about things such as OnTaskChanged.AfterProperties" and "UpdateTask.TaskProperties" bind to the same object, but have no idea how to change that.

In my sequential workflow's design view (VS 2010), I have a onWorkflowActivated1, followed by onTaskChanged1, and then an UpdateTask activity. My goal is to update the task title and description to a specific text whenever a task is added or updated. There's no practical purpose in doing this, but I just want to see it working. 

View Complete Post

More Related Resource Links

Update workflow task


Hello guys,


I created a timer job service to send reminders when a task is overdue, now I am looking at how visible it is for reassigning the task to some one else within the timer job service itself.


Is this possible?



SSRS Subscription Management: Restart, Stop, View Status, update properties, etc

As SSRS admins, there are times when a user comes to us and ask: I didn't get my reported emailed to me today?or worst, a report subscription going to multiple people doesn't run and now you have lots of people missing their subscription - (suppose server crashed, or something happened).One idea of course would be to have the subscription owner re-schedule it to run now, or create a new -- but - i'm thinking - we should create a subscription adminstration tool.a .net app that queries the ssrs web service, gets a list of subscriptions in the ssrs system (or perhaps by folder) and then is able to 'restart a subscription', "stop a running one", 'view all subscription status, schedule, owner, etc' if I wanted to d this - what is the web service that I could use this for?and most importanly - has anybody dont anything like this that they can share?this is for ssrs 2005 & and I'm hoping 2008 can be called through the same .net app tool

update statement which i can use in execute sql task.

I am having a table in the following manner.I am having  yearmonth till 202012 and from 201005 to 202012 I am having activeflag,tablename1,tablename2,tablename3,tablename4 as zero. This table needs to be update before runing the package.Before I load data for tablename1 for 201005 I need to update that 201005 for tablename1 to 1 and activeflag to 1 and  I need to update the 201002 tablename1 to zero.and when I load data for 201006 I need to update first that active flag =1 for 201006 and tablename1 to 1 for 201006 and then Update 201003 tablename1 to zero.i.e in tablename1 at a given time i need to see only 3 (yearmonth)=1 and update the first non zero record to zero.similary i need to update other tables also.  yearmonth                      Activeflag           tablename 1       tablename2         tablename 3   tablename4 201001                             0                 &nb

How to access properties in spworkflowproperties in the task?


In my task of a work flow, I need to access the original ItemUrl value.  this is a property in the spworkflowproperties class, but I cant seem to access it in my task (using aspx form for the task).  Is this jsut me missing something easy here?

(SP 2010 environment)



Rocky Sanders

Update Approval Workflow task status


Hello All

I am trying to update the task status automatically after a list item is approved without much luck. I need to set the task status to "completed" without having to manually hitting the "complete task" button, so the next person in line can approve the list item.

How can I change the status of a task using SharePoint Designer 2010?

In my SharePoint Designer task editor I have:


if Current Item:Approval Status equals 0;Approved

---I need to add a line in here that updates the task status to "completed"

Assign Approve list item to User2



Thank you all in advance.



Update all Properties in the User Information List after restoring a site collection to a new domain


hi All

I moved a site collection (content db) from one domain to another. After the site collection was restored i ran the stsadm -o migrateuser -oldlogin -newlogin. The result was that the login id of the user in the source domain was replaced with the login in the destination domain.

However the rest of the properties in the User Information List (paricularly interested in the Email) was not updated.

How can i get all the properties in the User Information List with values in the new domain

Thanks in Advance


task item not able to update custom list item


I have a site with NT authenticated users with READ permission only.

  • I have custom list 1 with disinherited permissions where users can add items. A column in this list captures the name of the persons Manager (person or Group). e.g item created by Person X
  • WorkFlow runs and copies the item from custom list 1 to custom list 2
  • Custom List 2 with disinherited permissions. The item continues to have Person X in the 'created by' column
  • WorkFlow runs on Custom List 2 assigning only contribute permission on Custom List 2 to the Manager entered in the item. Person X has no access to the item in Custom List 2
  • The WorkFlow has  a Collect Data From User task to be completed by the Manager. The WF runs and creates the Task in the task list. I've noticed that this item in the task list is created by Person X!
  • The Manager completes the Task successfully. Then Custom List 2 is supposed to get updated with the values the manager set in the Task.
  • The Manager has contribute permission on the item in Custom List 2, so they should be able to update the item, but the WF fails with either Access Denied, or unable to find item or some such.

Publishing Site - Task update was not accepted error



In a Publishing Site, I am trying to create a Site (Site Actions -> Create Site).  While Approving the newly created Site, I get a Error Page which says "Task update was not accepted".  I don't see any additional information in the logs?

I am using SharePoint 2007 Enterprise.  Anyone faced this problem? Please advice.

Thanks & Regards,
Kamlesh | Blog | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.

a error when update a workflow task item


I get a error when I want to update a task.



               Hashtable taskHash = new Hashtable();
               taskHash["TaskStatus"] = "1";
               SPWorkflowTask.AlterTask(m_task, taskHash, true);

error message:

Object reference not set to an instance of an object.   at Microsoft.SharePoint.SPListItem.PrepareItemForUpdate(Guid newGuidOnAdd, Boolean bMigration, Boolean& bAdd, Boolean& bPublish, Object& objAttachmentNames, Object& objAttachmentContents, Int32& parentFolderId)
   at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)
   at Microsoft.SharePoint.SPListItem.Update()
   at Microsoft.SharePoint.Workflow.SPWorkflowTask.AlterTask(SPListItem task, Hashtable htData, Boolean fSynchronous)
   at SSC.SAM2.Workflows.TaskPages.TaskPageCode.BtnComplete_Click(Object sender, EventArgs e)
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.

How to update workflow task and terminate workflow using silverlight client object model.



I have created a sequential workflow using visual studio. I also created a content type inherited from the workflow-task content type. Workflow creates a task-item in the task list. I want to update the workflow task using the silverlight client object model. I find on the internet and WorkflowTask.AlterTask() method to update the workflow task item. But I didn't find the equivalent of WorkflowTask.AlterTask(). Can any one help me to update the workflow task from the silverlight client object model?

I also want to terminate the workflow instance using silverlight client object model, but i didn't find any way to terminate the workflow using client object model?

SSIS - Data Flow Task Reads Fast But Importing the Output,Update & Deleting Extremely Slow & runs lo


Good day, I need help please.

In my source I read about 4mil records in a matter of seconds But Importing the Output to the Same Table takes about an 1 hour to update.

My Source Read is the Same Table to which i'm Importing, Updateing,Deleting

Importing: Table Lock & Check Constraints are checked

Please any ideas & suggestions will be great.

Thank You

what is the task of properties.OpenWeb() function?



I am really newbie to share point.And i know i may ask some really simple questions but the fact is that i don't what that does.

and be sure that i have googled , but as you know the sharepoint references are not too much.So i apologize if asking stupid questions.

Brainstorm your Brain and find solution,if no result stuck to Brainstormer.

ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Automatic vs Explicit Properties

If the reason that motivated the change from automatically implemented property to explicitly implemented property was to change the semantics of the property then you should evaluate whether the desired semantics when accessing the property from within the class are identical to or different from the desired semantics when accessing the property from outside the class.

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend