UserMessage
Properties:
DataPath
Field
TargetID
Text
Methods:
SetData
Constructors:
Description:
If the message was not shown to the user (this can occur when operating on server side, in background job, Com-connector or web-services), you can get saved messages using the GetUserMessages method.
In managed forms the following processing is executed when displaying a message:
If the message has the DataKey filled and it does not coincide with the key value of current form main attribute (object reference or information register record key), then:
- a new object form, coinciding with the DataKey property value is opened;
- if the message DataPath property is not filled, then it is filled by name of the opened object form main attribute;
- message display is called in just opened form;
- all corresponding messages are moved from the first form window to a new form (with the same DataKey property value, as the selected message). At the same time, the DataPath property is defined for the moved messages in a similar way, if it was not specified.
Availability:
Example:
Procedure ActionWihObject(DataObject) ... Message = New UserMessage(); Message.Text = "In line 11 of tabular section Nomenclature " +MissingCount+" "+NomenclatureUnit + " is missing."; Message.Field = "Nomenclature[10].Count"; Message.SetData(DataObject); Message.Message(); EndProcedure; |
See also: