How to programmatically find out a default value for a field (TFS WorkItem)?
-
Thursday, September 15, 2011 3:21 PM
I have a custom control that allows a user to create work items. To provide defaults for the field I need to somehow access the default value for a Field via TFS 2010 API. How can I do it? I know how to get allowed values but how to get the default value?
- Edited by VladimirKuryndin Thursday, September 15, 2011 8:07 PM
All Replies
-
Monday, September 19, 2011 11:25 AMModerator
Hello VladimirKuryndin,
Thanks for your post and sorry for the late response.
However, I can’t better understand your issue. Could you please offer me more information?
Why do you want to get the default value of one field in the TFS work item?
If you create one new work item, and don’t set the value to that default field, that filed will be set to that default value. And if you set value for that default field, the default value will be over-written by the value you set.
And after you create that work item, you can just read the default value.
If the scenario I described is not the same as you, please proved me more information so I can better understand your issue.
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Wednesday, September 28, 2011 9:07 AMModerator
Hello VladimirKuryndin,
What about your issue now? Have you resolved it?
Thanks.
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, October 14, 2011 1:37 PMHello! I have a custom TFS editor I created for my own purposes. And I need to populate the work item fields wiuth default values when a user creates new work item using my editor. So I need to know these default values programmatically before I try to save the work item.

