I have two SPLists. On List1 there is reusable workflow (with some functionality created in Visual Studio) that is changing some fields on List2. When item on list2 is updated then on list2 should be started another workflow. Somehow workflow on list2 doesn't start. When I update record from list2 manually then workflow starts correctly.
This is code from workflow on list1:
foreach (SPListItem item in ((SPList)listToChange).Items)
{
if (item.Fields.ContainsField(TargetFieldToUpdate))
{
if (item["Release ID"] != null && item["Release ID"].ToString() == currentItem["ReleaseID"].ToString())
{
item[TargetFieldToUpdate] = true;
item.Update();
}
}
}
What shall I change to make workflow from list2 start?