ItemSetText()

Appends to, or replaces the text of, a specified field.

Token ID

AFTKN_ITEM_SET_TEXT or 687

Syntax

VOID ItemSetText(ANSISTRING MessageID; 
                 ENUM Field; 
                 ANSISTRING FieldText; 
                 [ENUM AppendText];
                 [ENUM ClearChangeNotification])

Parameters

MessageID As ANSISTRING

Unique item identifier, returned by ItemMessageIDFromView().

Field As ENUM

Enumerated values:

4

Authority

3

BC

6

Caller

2

CC

7

Company

1

From

10

Message

8

Phone

5

Place

9

Subject

227

TaskCategory

230

TaskPriority

0

To

267

ViewName

FieldText As ANSISTRING

Replacement text.

AppendText As ENUM

(Optional) Enumerated values:

  • 0 No
  • 1 Yes
ClearChangeNotification As ENUM

(Optional) Enumerated values:

  • 0 No
  • 1 Yes

Remarks

The message body field (in the message view and the Object API) has a limit of 32,000 characters and stops accepting data after 32,000 characters.

Example

The following example changes the subject text of a new message (as denoted by X00). Both the MessageID and FieldText need to be surrounded by double quotes.

ItemSetText("X00"; 9; "This is a new subject");