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

V4 Graph Taxonomy #2885

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
442 changes: 442 additions & 0 deletions docs/graph/taxonomy.md

Large diffs are not rendered by default.

11 changes: 2 additions & 9 deletions docs/sp/column-defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,16 @@ import { spfi } from "@pnp/sp";
import "@pnp/sp/webs";
import "@pnp/sp/folders";
import "@pnp/sp/column-defaults";
import "@pnp/sp/taxonomy";

const sp = spfi(...);

// get the term's info we want to use as the default
const term = await sp.termStore.sets.getById("ea6fc521-d293-4f3d-9e84-f3a5bc0936ce").getTermById("775c9cf6-c3cd-4db9-8cfa-fc0aeefad93a")();

// get the default term label
const defLabel = term.labels.find(v => v.isDefault);

// set the default value using -1, the term id, and the term's default label name
await sp.web.lists.getByTitle("MetaDataDocLib").rootFolder.setDefaultColumnValues([{
name: "MetaDataColumnInternalName",
value: {
wssId: "-1",
termId: term.id,
termName: defLabel.name,
termId: "{term Id}",
termName: "{term Label}",
}
}])

Expand Down
Loading
Loading