Hello everyone,
I’m facing a complicated situation working with Microsoft Office 365 activities (package version 2.5.9, cannot change the version).
In my robot, I access a SharePoint site with two lists. I filter both lists by an ID to identify:
- In the first list, the item being processed.
- In the second list, documents related to this item.
Updating fields in the first list (e.g., a Status field) works without issues. However, when I try to update fields in the second list (where there are documents), I get an “Invalid Request” error, even though I follow the same procedure.
My current steps are:
- Receive the ID of the item to process as an argument.
- Use Get List Info to get the columns of the list and a
ListItemsobject. - Apply an
ODataFilter(fields/ColumnName eq ID) to filter results. - Use a For Each to iterate through the filtered items (should return only one).
- Inside the For Each, update the field value like this:
ListItem.Fields.First(Function(f) f.DisplayName = in_SharepointField).Value = NewValue
- Call Update List Item with the modified item.
This works perfectly for the first list.
When I try to update the second list, which contains documents, and modify the Description field, I get an Invalid Request error.
Inspecting the variables, the item looks correct, only the value is changed:
Old Item: Office365SharepointListItem { ..., Fields=..., "Description"=null ... }
Item after assign: Office365SharepointListItem { ..., Fields=..., "Description"="Signed" ... }
I suspect this could be because the item is a file/document, not a regular list item, but I’m not sure.
Has anyone faced a similar situation or knows how to update metadata fields in a SharePoint document library using UiPath Office 365 activities?