ErrorInfo.Title([Text]) Method
Version: Available or changed with runtime version 11.0.
Specifies the title of the error.
Syntax
[Title := ] ErrorInfo.Title([Title: Text])
Note
This method can be invoked using property access syntax.
Parameters
ErrorInfo
Type: ErrorInfo
An instance of the ErrorInfo data type.
[Optional] Title
Type: Text
The title of the ErrorInfo
Return Value
[Optional] Title
Type: Text
The current title of the ErrorInfo.
Remarks
Set the Title property on error dialogs that are presented to the user to provide a more informative issue description. For advice on how to use the title to describe what’s wrong and enable the user to quickly scan the meaning of the error, see User experience guidelines for errors.
You aren't required to set a title for error dialogs. For example, you might not want to add it for validation error messages. For more information, see Error message best practices - what to say?.
Example
var
dimension: Text[30];
vendorCode: Text[30];
MyErrorInfo: ErrorInfo;
begin
// set up the error info object
MyErrorInfo.Title('The line dimension value isn''t valid');
MyErrorInfo.Message(
StrSubstNo('The dimension value must be blank for the dimension %1 for Vendor %2', dimension, vendorCode)
);
MyErrorInfo.DetailedMessage('Add some text to help the person troubleshooting this error.');
// maybe set more properties
Error(MyErrorInfo);
end
Related information
ErrorInfo Data Type
User experience guidelines for errors
AL error handling
Getting Started with AL
Developing Extensions