ID of the message sender.
object.SenderID
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMessage interface |
int
Display the full name and ID of the sender.
Dim aTrans
Dim aMes
Dim aMessageRecipients
Dim aPatient
Dim aMessageId
Dim aSender
'Start transaction to create new message
Set aTrans = Profile.StartMapTransaction
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")
exit sub
end if
aMes.Send
aMessageId = aMes.ID
aTrans.Commit
'Start transaction to load message by its ID
set aTrans = Profile.StartMapTransaction
set aMes = Profile.LoadMessage(aMessageId)
if aMes.SenderId > 0 then
set aSender = Profile.LoadProviderById(aMes.SenderId)
Profile.MsgBox("The Message Sender: " & aSender.FullName & " (ID: " & aSender.Id & ")")
else
Profile.MsgBox("The Message Sender is not initialized")
end if
In Profile Client v8 on User Interface Sender ID cannot be found, but Sender can be found in
.