Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A type named 'SP.FieldNote' could not be resolved by the model when trying to update a field #1294

Closed
1 of 4 tasks
AJIXuMuK opened this issue Jul 22, 2020 · 2 comments · Fixed by #1297
Closed
1 of 4 tasks

Comments

@AJIXuMuK
Copy link
Contributor

Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Version

Please specify what version of the library you are using: [2.0.6]

Please specify what version(s) of SharePoint you are targeting: [SPO]

Expected / Desired Behavior / Question

Multiline Text field is updated with no errors

Observed Behavior

A type named 'SP.FieldNote' could not be resolved by the model error.

Steps to Reproduce

await sp.web.fields.getByInternalNameOrTitle('fieldtitle').update({
            // update params
          });

Metadata for this request:

"__metadata":{"type":"SP.FieldNote"}

If I explicitly set the type to be SP.Field (as it was in v1 of the library) - everything works:

await sp.web.fields.getByInternalNameOrTitle('fieldtitle').update({
            // update params
          }, 'SP.Field');
@patrick-rodgers
Copy link
Member

This is coming out of the change made in #1187 to make the field type optional. You can always override it like you did.

We've updated the code in update to pull the odata.type which seems to reflect the true type which FieldTypeKind does not.

@patrick-rodgers patrick-rodgers added this to the 2.0.7 milestone Jul 27, 2020
patrick-rodgers added a commit to patrick-rodgers/pnpjs that referenced this issue Jul 27, 2020
@patrick-rodgers patrick-rodgers mentioned this issue Jul 27, 2020
4 tasks
@github-actions
Copy link

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants