DeleteMessage

Syntax

DeleteMessage(message_num)

Description

Use the DeleteMessage method to delete a message catalog entry.

Note:

You cannot delete a message sets; only message catalog entries can be deleted.

The Save method must be run after DeleteMessage to save the changes.

Parameters

Parameter Description

message_num

Specifies the number of a message catalog entry to be deleted as a number value.

Returns

A Boolean value; False if the message for the given message number does not exist, True otherwise.

Example

Function Delete()
   Local ApiObject &MYSESSION;
   Local ApiObject &MSG_CTLG;
   &MYSESSION = %Session;
   &MSG_CTLG = &MYSESSION.GetCompIntfc(CompIntfc.MESSAGE_CATALOG_CI);
   &MSG_CTLG.MESSAGE_SET_NBR = 31600;
   &MSG_CTLG.Get();
   &MYLEVEL1 = &MSG_CTLG.PSMSGCATDEFN;
   If Not &MSG_CTLG.DeleteMessage(2) Then
      MessageBox(0, "", 0, 0, "Invalid message number");
      Return;
   End-If;
End-Function;