Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Task created event is not firing properly in sharepoint workflow

$
0
0

Hi ,

I need to update spfielduservaluecollection ,

For this requirement i need to access task created event

but it work sometimes only

 private void onTaskCreated1_Invoked(object sender, ExternalDataEventArgs e)
        {
            this.onTaskCreated1_AfterProperties1 = this.onTaskCreated1.AfterProperties;
            SPListItem spLstItem = workflowProperties.TaskList.Items.GetItemById(this.onTaskCreated1_AfterProperties1.TaskItemId);
            SPFieldUserValueCollection spUservalues = Utility.ConvertSPUserCollection("President", workflowProperties.Web);

            spLstItem[SPBuiltInFieldId.AssignedTo] = spUservalues.ToString();
            spLstItem[SPBuiltInFieldId.WorkflowVersion] = 1;
            spLstItem.Update();
           
        }

This is my code for assigning the values to assignto field

Can anyone help me

Thanks in advance


Viewing all articles
Browse latest Browse all 11508


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>