I’m trying to call AlterTask on a newly created Sharepoint task to add extended properties to my task, and a NotSupportedException is thrown.
What’s going on?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The newly created task is actually a SharePoint ListItem. ExtendedProperties is specifically a Workflow Task property.
As per the MSDN documentation:
This means that Content Type of the SPListItem that represents your new Task must be set to “Workflow Task” before the AlterTask method can be called on it: