PutRscMsg

ACCPAC Common Controls

AccpacErrors.PutRscMsg

Adds an error message to the collection from an application's server-side language resource file.

Sub PutRscMsg(
  AppID As String,
  rscID As Long,
  Priority As tagErrorPriority,
  [Params As Variant],
  [Source As String],
  [ErrCode As String],
  [HelpFile As String],
  [HelpContextID As Long])

Parameters

AppID

[in] the 2-character application ID of the language resource file

rscID

[in] the resource ID of the error message defined in the language resource file

Priority

[in] the error priority

Params

[in, optional] an array of parameters for the error message if the error message contains string-replacement tokens, or Null if replacement tokens are not used in the error message

The tokens in the error message will be replaced by the specified parameters.

Source

[in, optional] the source of the error

ErrCode

[in, optional] the error code

HelpFile

[in, optional] the help file in which help messages can be found for this error

HelpContextID

[in, optional] the Context ID of the help message

Remarks

The error message is retrieved from the application's server-side string resource file identified by the AppID and rscID. The error message could be plain text, or a string with replacement tokens. Replacement tokens take the form %n, where n is a number starting from 1. When replacement tokens are present in the error message, they are replaced by the value in the corresponding position in the Params array.

PutRscMsg can be used to display error messages whose strings come from other applications. For example, a Bank Services UI can use PutRscMsg to display an error message whose string comes from the Common Services server-side language resource file.