I´m developing a TFS 2012 web access custom control and I need to change some workitem field values when the save workitem button is clicked.
I’ve just developed the same custom control for Visual Studio and I’ve performed these changes in the IWorkItemControl.FlushToDatasource method but I don't know how to achieve the same at web access control.
I’ve tried to change the workitem field values in the invalidate function when the workitem is being saved,
invalidate: function (flushing) {
if (this._workItem.isSaving()) {
this._workItem.getField("FieldName").setValue("newValue");
}
},
But it does not work, although the changes made while saving the workitem are included in the list of updated fields, they are not saved.
Any idea how can it be implemented by using the Javascript API?
Thanks.
Oscar
Can you try this: