Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:08:54+00:00 2026-05-30T16:08:54+00:00

I am new to SharePoint. Sorry if answer to my question is obvious. I

  • 0

I am new to SharePoint. Sorry if answer to my question is obvious.

I can’t understand, how to assign Task to user programmatically. I set properties in SPWorkflowTaskProperties, all properties pass to Task, but string property AssignedTo doesn’t.

//next variants don't works
TaskProperty.AssignedTo = "1;#Michael Pushin";
TaskProperty.AssignedTo = "Michael Pushin";    
TaskProperty.ExtendedProperties["Assigned To"] = "1;#Michael Pushin";

I am trying to realize delegation pattern. For it I read information from list item that have field type Person.

SPList functList = thisWeb.Lists["Functions"];
SPListItem functItem = functList.GetItemById(1);
object person = functItem["Default Assignee"];
string assignee = person.ToString();
//At this point assignee equals "1;#Michael Pushin"

When I set the “Assigned To” field by hands and read programmatically it value equals to “1;#Michael Pushin” too.

How can I set “Assigned To” field programmatically from value of the person variable?

Thank you in advance.

PS: sorry for my writing. English is not my native language.

PPS: SharePoint 2010.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:08:55+00:00Added an answer on May 30, 2026 at 4:08 pm

    Do not convert person to string.

    object person = functItem["Default Assignee"];
    

    At this point person is smth like SPFieldUserValue. Cast to the actual type and see if you’re able to get SPUser out of it and then grab the SPUser.Login.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to SharePoint, sorry if answer to my question is obvious. I
I am new to SharePoint, sorry if answer to my question is obvious. I
I am new to SharePoint. Sorry if answer to my question is obvious. I've
I am new to SharePoint and .Net development, sorry if answer for my question
I'm new to SharePoint and have a general question regarding list comparison. Currently, there
I am new this sharepoint development and i have task in hand to do
what's the best way to accomplish this task? (new to sharepoint) Do we need
I am new to SharePoint development and have a question. I got that SharePoint
I am new to SharePoint. I was hoping you can point me to the
Being very new to SharePoint coding I have been assigned the task to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.