Skip to content

Fix field update failing for properties of derived field types - #1920

Closed
AndreIsraelAO wants to merge 1 commit into
pnp:devfrom
AndreIsraelAO:fix/1903-field-update-metadata
Closed

AndreIsraelAO wants to merge 1 commit into
pnp:devfrom
AndreIsraelAO:fix/1903-field-update-metadata

Conversation

@AndreIsraelAO

@AndreIsraelAO AndreIsraelAO commented Nov 2, 2026 •

Copy link
Copy Markdown

## 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

@Adam-it
Adam-it marked this pull request as draft November 3, 2026 01:11
@Adam-it

Adam-it commented Nov 3, 2026

Copy link
Copy Markdown
Member

@AndreIsraelAO we appreciate your help but please do follow our contribution guide https://pnp.github.io/pnpcore/contributing/readme.html
You did not get assigned to the related issue nor the issue is 100% ready to be taken as we are still investigating with @gszdev on the best approach to fix it.

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?

@AndreIsraelAO

Copy link
Copy Markdown
Author

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.

@Adam-it

Adam-it commented Nov 3, 2026

Copy link
Copy Markdown
Member

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Bug report: PnP.Core - Issue while changing of list field properties

2 participants