Je ne reçois aucune exception, mais le code ci-dessous ne fonctionne tout simplement pas. Des idées?Impossible de mettre à jour un élément de liste à partir d'une tâche de workflow en C#
SPSecurity.RunWithElevatedPrivileges(delegate() {
using (SPWeb web = this.workflowProperties.Web) {
try {
SPListItem item = web.Lists["NewHireFormsLibrary"].Items[workflowProperties.ItemId - 1];
item["Field 1"] = "Gotcha!!!";
item.Update();
LogHistory("Information", "Workflow indexing complete. " + item["Field 1"], "");
}
catch (Exception ex) {
LogHistory("Error", ex.Message, ex.StackTrace);
}
}
)};
Ok, juste une mise à jour. Cela fonctionne si j'applique l'article à un champ non-infopath. Comment puis-je mettre à jour un champ infopath? –