ID of the created message.
object.ID
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMessage interface |
int
Add a new new message and display its ID.
Dim aMes
Dim aMessageRecipients
Dim aPatient
Set aMes = Profile.CreateMessage
aMes.Text = aMes.AddText("Hello! Come to my birthday party!")
aMes.Subject = "Birthday party"
set aMessageRecipients = aMes.Recipients
set aPatient = Profile.SelectPatient
if aPatient.Email <> "" then
aMessageRecipients.AddPatient(aPatient)
end if
if aMessageRecipients.Count = 0 then
Profile.MsgBox("The massage cannot be sent, because the patient has no email")
else
aMes.Send
Profile.MsgBox("ID of the message is " & aMes.ID)
end if
In Profile Client v8 on User Interface ID cannot be found, but Messages can be found in
.