---
title: "2020.5 release notes"
canonical_url: "https://www.nutrient.io/guides/web/release-notes/2020-5/"
md_url: "https://www.nutrient.io/guides/web/release-notes/2020-5.md"
last_updated: "2026-05-26T09:21:30.508Z"
description: "Easily migrate to the unified CRUD API in PSPDFKit 2020.5 with improved batch updates and streamlined object management for annotations and comments."
---

# Unified CRUD API enhancements for easy migration

[PSPDFKit for Web 2020.5](https://www.nutrient.io/blog/pspdfkit-for-web-introduces-new-crud-api/) comes with a few improvements that might require an ad hoc migration.

### Notable changes

#### Unified CRUD API

- This release introduces a unified API for creating, updating, deleting, and saving objects:
  - [`Instance#create`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#create)

  - [`Instance#update`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#update)

  - [`Instance#delete`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#delete)

  - [`Instance#ensureChangesSaved`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#ensurechangessaved)

  These methods support a single change or an array of changes allowing batched updates. Each of them resolves with an array of resolved changes (created/updated/deleted/saved). Operations are performed even if some batched changes can’t be executed. In this case, the methods reject with an array containing the resolved changes or errors for failed changes.

  Supported change types are: annotations, bookmarks, form fields, form field values, and comments.

- Most existing `Instance` methods for performing modifications and saving objects have been deprecated:

| Deprecated Method                                                     | Replacement                       |
| --------------------------------------------------------------------- | --------------------------------- |
| `createAnnotation/FormField/Bookmark`                                 | [`Instance#create`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#create)             |

| `updateAnnotation/FormField/Bookmark`                                 | [`Instance#update`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#update)             |

| `deleteAnnotation/FormField/Bookmark`                                 | [`Instance#delete`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#delete)             |

| `hasUnsavedAnnotations/FormFields/FormFieldValues/Bookmarks/Comments` | [`Instance#hasUnsavedChanges`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#hasunsavedchanges)  |

| `ensureAnnotation/FormField/BookmarkSaved`                            | [`Instance#ensureChangesSaved`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#ensurechangessaved) |

| `saveAnnotations/FormFields/FormFieldValues/Bookmarks/Comments`       | [`Instance#save`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#save)               |

To migrate your existing use of CRUD-related methods, update the method name. If you’re using the result value, make sure to update this too since the new unified CRUD methods return an array of changes instead of a single change. For example:

```js

// Deprecated code:
const createdAnnotation = await instance.createAnnotation(newAnnotation);
console.log(`Created annotation with ID ${createdAnnotation.id}`);

// Should be replaced with:
const [createdAnnotation] = await instance.create(newAnnotation);
console.log(`Created annotation with ID ${createdAnnotation.id}`);

```

- [`Instance#save`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#save) and [`Instance#ensureChangesSaved`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#ensurechangessaved) now report errors for some changes when a save fails.

- In contrast to the now-deprecated [`Instance#createAnnotation`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#createannotation), [`Instance#create`](https://www.nutrient.io/api/web/classes/NutrientViewer.Instance.html#create) fails when creating a widget annotation without its associated form field. Make sure to create both in the same `create` method call:

  ```js

  const widget = new NutrientViewer.Annotations.WidgetAnnotation({
    id: NutrientViewer.generateInstantId(),
    pageIndex: 0,
    formFieldName: "MyFormField",
    boundingBox: new NutrientViewer.Geometry.Rect({
      left: 100,
      top: 75,
      width: 200,
      height: 80
    })
  });
  const formField = new NutrientViewer.FormFields.TextFormField({
    name: "MyFormField",
    annotationIds: NutrientViewer.Immutable.List([widget.id]),
    value: "Text shown in the form field"
  });

  instance.create([widget, formField]);
  ```

A created form field requires the widget annotation ID before the annotation is created. This means you must assign a unique UID for your widget annotation when using this new API. You can generate a proper UID via the newly introduced [`PSPDFKit#generateInstantId`](https://www.nutrient.io/api/web/functions/NutrientViewer.generateInstantId.html).

If you use PSPDFKit Server, make sure you read the [2020.5 server migration guide](https://www.nutrient.io/guides/product-archives-and-deprecated-solutions.md).

For a full list of changes, check out the [changelog](https://www.nutrient.io/guides/web/changelog.md#2020.5).
---

## Related pages

- [1 1](/guides/web/release-notes/1-1.md)
- [1 0](/guides/web/release-notes/1-0.md)
- [1 10](/guides/web/release-notes/1-10.md)
- [1 11](/guides/web/release-notes/1-11.md)
- [1 12](/guides/web/release-notes/1-12.md)
- [1 13 1](/guides/web/release-notes/1-13-1.md)
- [1 13](/guides/web/release-notes/1-13.md)
- [1 14](/guides/web/release-notes/1-14.md)
- [1 15](/guides/web/release-notes/1-15.md)
- [1 2](/guides/web/release-notes/1-2.md)
- [1 3](/guides/web/release-notes/1-3.md)
- [1 4](/guides/web/release-notes/1-4.md)
- [1 5](/guides/web/release-notes/1-5.md)
- [1 6](/guides/web/release-notes/1-6.md)
- [1 7](/guides/web/release-notes/1-7.md)
- [1 8](/guides/web/release-notes/1-8.md)
- [1 9](/guides/web/release-notes/1-9.md)
- [2017 3](/guides/web/release-notes/2017-3.md)
- [Update your PSPDFKit for Web to version 2017.7](/guides/web/release-notes/2017-7.md)
- [Explore new features in PSPDFKit for Web 2017.9](/guides/web/release-notes/2017-9.md)
- [Upgrade annotations in PSPDFKit Web 2017.8](/guides/web/release-notes/2017-8.md)
- [New features in the 2018.1 migration guide](/guides/web/release-notes/2018-1.md)
- [2017 6](/guides/web/release-notes/2017-6.md)
- [Discover the new features in PSPDFKit for Web 2018.3](/guides/web/release-notes/2018-3.md)
- [PSPDFKit for Web 2018.2 migration insights](/guides/web/release-notes/2018-2.md)
- [Explore PSPDFKit for Web 2018.4 features](/guides/web/release-notes/2018-4.md)
- [Explore new features in PSPDFKit 2018.5](/guides/web/release-notes/2018-5.md)
- [Explore PSPDFKit for Web 2018.6 enhancements](/guides/web/release-notes/2018-6.md)
- [2019 2](/guides/web/release-notes/2019-2.md)
- [Key updates in PSPDFKit for Web 2019.1](/guides/web/release-notes/2019-1.md)
- [Seamless migration to PSPDFKit for Web 2020.2](/guides/web/release-notes/2020-2.md)
- [Essential updates in PSPDFKit for Web 2019.4](/guides/web/release-notes/2019-4.md)
- [PSPDFKit for Web 2019.3 migration highlights](/guides/web/release-notes/2019-3.md)
- [Explore the new features in PSPDFKit 2018.7](/guides/web/release-notes/2018-7.md)
- [PSPDFKit for Web 2019.5 migration insights](/guides/web/release-notes/2019-5.md)
- [PSPDFKit Web and Server 2020.4 migration update](/guides/web/release-notes/2020-4.md)
- [Key changes in PSPDFKit for Web 2020.1](/guides/web/release-notes/2020-1.md)
- [Upgrade to PSPDFKit Web 2020.3 seamlessly](/guides/web/release-notes/2020-3.md)
- [PSPDFKit Web 2020.6 migration insights](/guides/web/release-notes/2020-6.md)
- [Seamlessly migrate to PSPDFKit for Web 2021.2](/guides/web/release-notes/2021-2.md)
- [Upgrade to PSPDFKit for Web 2021.1 with ease](/guides/web/release-notes/2021-1.md)
- [PSPDFKit 2021.4 migration guide for seamless updates](/guides/web/release-notes/2021-4.md)
- [PSPDFKit 2022.1.1 migration changes](/guides/web/release-notes/2022-1.md)
- [Migration guide for PSPDFKit 2021.5](/guides/web/release-notes/2021-5.md)
- [2021 3](/guides/web/release-notes/2021-3.md)
- [2021 6](/guides/web/release-notes/2021-6.md)
- [Enhancements in PSPDFKit for Web 2022.2](/guides/web/release-notes/2022-2.md)
- [Explore the new features of PSPDFKit for Web 2022.3](/guides/web/release-notes/2022-3.md)
- [PSPDFKit for Web 2022.4 migration overview](/guides/web/release-notes/2022-4.md)
- [Key improvements in PSPDFKit for Web 2022.5](/guides/web/release-notes/2022-5.md)
- [Discover the key updates in PSPDFKit for Web 2023.1](/guides/web/release-notes/2023-1.md)
- [PSPDFKit 2023.2 migration and updates](/guides/web/release-notes/2023-2.md)
- [Key updates in PSPDFKit for Web 2023.3](/guides/web/release-notes/2023-3.md)
- [Explore key updates in PSPDFKit for Web 2023.4](/guides/web/release-notes/2023-4.md)
- [Key updates in PSPDFKit for Web 2023.5](/guides/web/release-notes/2023-5.md)
- [2024 2](/guides/web/release-notes/2024-2.md)
- [2024 5](/guides/web/release-notes/2024-5.md)
- [Essential Nutrient Web SDK 2024.1 migration tips](/guides/web/release-notes/2024-1.md)
- [2024 4](/guides/web/release-notes/2024-4.md)
- [2024 3](/guides/web/release-notes/2024-3.md)
- [2024 7](/guides/web/release-notes/2024-7.md)
- [2024 8](/guides/web/release-notes/2024-8.md)
- [Upgrading Nutrient Web SDK](/guides/web/release-notes/upgrading.md)

