setValueCustomData (Item - Java)

Sets the value of an item to custom data from an object.

Note: This method is new with Release 6.

Defined in



public void setValueCustomData(Object userobj)
    throws NotesException
public void setValueCustomData(String datatypename, Object userobj)
    throws NotesException


Object 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.

String datatypename

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


The new value replaces the existing value.

To keep the changes, you must call after calling setValueCustomData.

The custom data cannot exceed 64K.

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

For methods that get custom data, see:

For other methods that write custom data to an item, see: