Skip to content

Fixes DynamicForm trying to load TaxonomyFields with wrong display name. Closes #1422 #1479

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

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

martinlingstuyl
Copy link
Contributor

Q A
Bug fix? [x]
New feature? [ ]
New sample? [ ]
Related issues? fixes #1422

What's in this Pull Request?

Fixes an issue with Taxonomy Fields concerning the relation between Taxonomy Fields and their corresponding note fields. The corresponding note field internal name was retrieved by assuming that the Display Name of that note field was equal to the internal name of the Taxonomy field and _0.

So for example:
If the taxonomy field has an internal fieldname called Project, the display name of the note field was inferred to be Project_0. This is actually a correct assumption in most cases. When creating a Column using the SharePoint UI for example.
But there are scenario's when this is incorrect. For example when fields are provisioned using automated solutions, it's possible for these field titles to have received different values.

It's better to retrieve the field by Id. And this ID is also present in the details of the field in the form of the TextField property.

@martinlingstuyl martinlingstuyl changed the base branch from master to dev February 28, 2023 14:43
@martinlingstuyl martinlingstuyl force-pushed the fix-taxonomy-field-issue branch from 720939a to 0e68bfe Compare February 28, 2023 14:45
@martinlingstuyl martinlingstuyl force-pushed the fix-taxonomy-field-issue branch from 0e68bfe to 8c2f768 Compare February 28, 2023 14:47
@joelfmrodrigues joelfmrodrigues self-assigned this Mar 1, 2023
@joelfmrodrigues joelfmrodrigues merged commit cd5a9ef into pnp:dev Mar 1, 2023
@joelfmrodrigues
Copy link
Collaborator

@martinlingstuyl many thanks! Merged

@joelfmrodrigues joelfmrodrigues added this to the 3.14.0 milestone Mar 1, 2023
@martinlingstuyl martinlingstuyl deleted the fix-taxonomy-field-issue branch March 1, 2023 10:07
@martinlingstuyl
Copy link
Contributor Author

Nice!

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.

Dynamic form trying to load Image tags with wrong internal name
2 participants