I'm working on an approval workflow where when a user uploads a document, he assigns the task to the approver while creating a document, like:

enter image description here

Now I'm trying to fetch the approver's details in my code so that I can assign a task and send an email notification to the approver for the task assigned.

if (workflowProperties.Item["Approver"] != null)
            this._approver = workflowProperties.Item["Approver"].ToString();

But I don't know if that's the correct way and how do I get all the user information and email so that I can assign a task to the user?

Note: I tried with this but the task is not assigned to the intended user. No task however is assigned when I upload a document. Please suggest what I'm doing wrong. Thanks in advance.

Your Answer

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

Browse other questions tagged or ask your own question.