microsoftgraph / msgraph-sdk-java

Microsoft Graph SDK for Java
https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
MIT License
371 stars 125 forks source link

/drives/{id}/items/{id}/listItem/fields #2093

Closed denis3119 closed 5 days ago

denis3119 commented 1 month ago

image

v5.xx I used code like this to update the fields: var sourceFieldValueSet = new FieldValueSet(); sourceFieldValueSet.additionalDataManager().putAll(fields); getGraphClient() .drives(microsoftOauthProperties.getDriveId()) .items(id) .listItem() .fields() .buildRequest() .patch(sourceFieldValueSet);

PATCH https://graph.microsoft.com/v1.0/drives/{id}/items/{id}/listItem/fields

v6.xx patch was removed.

So, how can I patch the columns via Microsoft Graph?

Ndiritu commented 1 week ago

Hi @denis3119

Please consider accessing the list item fields via the sites() root URL path:


graphServiceClient.sites().bySiteId("").lists().byListId("").items().byListItemId("").fields().patch();

However, you can still overwrite the request URL & use your preferred endpoint using withUrl:


graphServiceClient.sites().bySiteId("").lists().byListId("").items().byListItemId("").fields().withUrl(
    "https://graph.microsoft.com/v1.0/drives/{id}/items/{id}/listItem/fields"
).patch(null);
microsoft-github-policy-service[bot] commented 1 week ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.