Skip to content

Commit

Permalink
Merge pull request #3042 from pnp/version-4
Browse files Browse the repository at this point in the history
Release 4.1.0 - Merge to Main
  • Loading branch information
juliemturner authored May 28, 2024
2 parents a3ed963 + 0240d02 commit 3026360
Show file tree
Hide file tree
Showing 14 changed files with 471 additions and 260 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 4.1.0 - 2024-May-24

### Fixed

- graph
- Update to better handle graph default url logic

## 4.0.1 - 2024-Apr-23

### Fixed
Expand Down
145 changes: 105 additions & 40 deletions debug/spfx/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions debug/spfx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
"@microsoft/sp-office-ui-fabric-core": "1.18.2",
"@microsoft/sp-property-pane": "1.18.2",
"@microsoft/sp-webpart-base": "1.18.2",
"@pnp/core": "^4.0.0-alpha0-v4nightly.20240412",
"@pnp/graph": "^4.0.0-alpha0-v4nightly.20240412",
"@pnp/logging": "^4.0.0-alpha0-v4nightly.20240412",
"@pnp/sp": "^4.0.0-alpha0-v4nightly.20240412",
"@pnp/core": "^4.0.1",
"@pnp/graph": "^4.0.1",
"@pnp/logging": "^4.0.1",
"@pnp/sp": "^4.0.1",
"@pnp/sp-admin": "^4.0.1",
"tslib": "2.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docs/sp-admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `@pnp/sp-admin` library enables you to call the static SharePoint admin API'
- `_api/Microsoft.Online.SharePoint.TenantAdministration.SiteProperties`
- `_api/Microsoft.Online.SharePoint.TenantAdministration.Tenant`

These APIs typically require an elevated level of permissions and should not be relied upon in general user facing solutions. Before using this library please understand the impact of what you are doing as you are updating settings at the tenant level for all users.
These APIs typically require an elevated level of permissions and should not be relied upon in general user facing solutions. Before using this library please understand the impact of what you are doing as you are updating settings at the tenant level for all users. Also keep in mind these endpoints do not support application permissions, therefore you will need to get a user token for delegated access, ergo they cannot be used unattended.

!!! warning
These APIs are officially not documented which means there is no SLA provided by Microsoft. Furthermore, they can be updated without notification.
Expand Down
37 changes: 37 additions & 0 deletions docs/sp/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,43 @@ updateVal[fields[0].InternalName] = "-1;#New Term|bb046161-49cc-41bd-a459-566717
await sp.web.lists.getByTitle("TestList").items.getById(newItem.Id).update(updateVal);
```

#### File List Item
To update a multi-value taxonomy field on a file item, a different serialization is needed.
```TypeScript
import { spfi } from "@pnp/sp";
import "@pnp/sp/webs";
import "@pnp/sp/lists";
import "@pnp/sp/items";
import "@pnp/sp/files";

const sp = spfi(...);

const multiValueTaxonomy = {
field: "MetaDataColumn",
values: [
{
label: "Demo 1",
guid: "bb046161-49cc-41bd-a459-5667175920d4"
},
{
label: "Demo 2",
guid: "0069972e-67f1-4c5e-99b6-24ac5c90b7c9"
}
]
}

// serialize values for field "MetaDataColumn"
// it needs to be serialized as {field label}|{field guid} joined by ;
const newFieldValue = multiValueTaxonomy
.map((val) => (`${val.label}|${val.guid}`)).join(";")
// this will result to "Demo 1|bb046161-49cc-41bd-a459-5667175920d4;Demo 2|0069972e-67f1-4c5e-99b6-24ac5c90b7c9"

await (await sp.web.getFileByServerRelativePath("/sites/demo/DemoLibrary/File.txt").getItem()).validateUpdateListItem([{
FieldName: multiValueTaxonomy.field,
FieldValue: multiValueTaxonomy.guid, //Label|TermGuid;Label 2|TermGuid 2
}]);
```

### Update BCS Field

Please see [the issue](https://github.com/pnp/pnpjs/issues/2143) for full details.
Expand Down
Loading

0 comments on commit 3026360

Please sign in to comment.