1

I have a SP2010 workflow created in Visual Studio in which several tasks exist. At each task creation I need to send message to specific user which contains information about specific task, one of the information must be the link by which the end user can directly open the task by clicking it. So I have to define the task list item ID (int type, not guid). Could you help me?

1

All Sharepoint lists, including Tasks, have an auto increment integer column "ID". We cannot bypass it or remove this column. You can see it by modify the view.

0

How about a very simple secondary workflow on the task list itself that fires when a new task is created? This workflow would only be responsible with sending the email (and would have access to the item id since it is associated with the task list itself). You could even just use Designer to create this secondary workflow since it is very simple in terms of logic.

0
public SPWorkflowTaskProperties onTaskChanged1_AfterProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
public SPWorkflowTaskProperties onTaskChanged1_BeforeProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();

private void onTaskCreated1_Invoked(object sender, ExternalDataEventArgs e)
{
    int id = onTaskChanged1.AfterProperties.TaskItemId;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.