Passing Error Messages to the End User

When working with the attachment functions, if you want the end user to be able to view error messages (such as that the file is too large, that the file was not found, that there is no disk space at the storage location, and so on), then you need to write or clone PeopleCode to interpret function return codes and pass error messages back to the user.

As an example, each of the programs in the FILE_ATTACH_WRK derived/work record includes a parameter that sets the message level, but does not translate these into user terminology. The message levels that can be set are:

  • 0 – Suppress all messages including errors.

  • 1 – Display all messages.

  • 2 – Suppress success messages only, but display error messages.

By default, the message level is 0 for each of these programs. The programs are demonstrated on the PeopleTools Test Utilities page.