You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix field update failing for properties of derived field types - #1920
## Problema Field updates are sent typed as `SP.Field`, so SharePoint rejects properties that only exist on derived types (e.g. `AnchorId`/`TermSetId` on `SP.Taxonomy.TaxonomyField`, `RichText` on `SP.FieldMultiLineText`): \The property 'AnchorId' does not exist on type 'SP.Field'`. ## Solução \Field.UpdateApiCallOverrideHandler` now removes `__metadata` from the update body, so SharePoint resolves the field's real type (approach discussed in the issue). ## Como testar Update \AnchorId` of a taxonomy field on a list and call `UpdateAsync()`; also update a plain field to check for regressions. ## Riscos Not built or tested locally (no .NET SDK available) and not verified against a live tenant. Applies to all field updates, not only derived types.
`Closes#1903
Also, the Not built or tested locally (no .NET SDK available) and not verified against a live tenant in your PR description is quite worrying 🫤. I would say this PR is more in a prototype phase rather than fully complete implementation that should be checked right?
Thanks for the feedback, @Adam-it, and sorry about that. You're right: this was premature (the issue wasn't assigned or settled, and the change was untested). Closing it; I'll leave the fix to you and @gszdev.
Thanks for the feedback, @Adam-it, and sorry about that. You're right: this was premature (the issue wasn't assigned or settled, and the change was untested). Closing it; I'll leave the fix to you and @gszdev.
Thanks for the honest take. If you wanna contribute and help out we have plenty of issues ready to be taken 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
## ProblemaField updates are sent typed as `SP.Field`, so SharePoint rejects properties that only exist on derived types (e.g. `AnchorId`/`TermSetId` on `SP.Taxonomy.TaxonomyField`, `RichText` on `SP.FieldMultiLineText`):\The property 'AnchorId' does not exist on type 'SP.Field'`.## Solução\Field.UpdateApiCallOverrideHandler` now removes `__metadata` from the update body, so SharePoint resolves the field's real type (approach discussed in the issue).## Como testarUpdate \AnchorId` of a taxonomy field on a list and call `UpdateAsync()`; also update a plain field to check for regressions.## RiscosNot built or tested locally (no .NET SDK available) and not verified against a live tenant. Applies to all field updates, not only derived types.`Closes #1903