replaceItemValueCustomData (NotesDocument - JavaScript)

Replaces all items of the specified name with one new item, which is assigned custom data from an object. If the document does not contain an item with the specified name, this method creates a new item and adds it to the document.

Defined in

NotesDocument

Syntax

replaceItemValueCustomData(itemname:string, userobj:any) : NotesItem

replaceItemValueCustomData(itemname:string, datatypename:string, userobj:any) : NotesItem

Parameter Description
itemname The name of the item.
userobj An object that contains the custom data. The class that defines this object must implement Serializable. If desired, you can override readObject and writeObject.
datatypename

A name for the data type. When getting custom data, use this name for verification.

Usage

The new item replaces all previous items with the same name.

To keep the changes, you must call save after calling this method.

The custom data cannot exceed 64KB.

If you intend to get the custom data through a language binding other than Java or JavaScript, use a "Bytes" method.