ISPatientSMS.ErrorMessage

Description

The error message that appears if the patient's SMS message was not delivered.

Syntax

object.ErrorMessage

Part Attribute Type Description
object Required
The object always implements the ISPatientSMS interface
Restriction: This property is readonly.

Return Value

string

Example

Send a new SMS message, display its text and the error message if it wasn't sent.

Dim aPatient
Dim aPhoneNumber
Dim aPatientSms
Dim aMessage 

Set aPatient = Profile.SelectPatient
aPhoneNumber = aPatient.CellPhone
 
set aPatientSms = Profile.SendPatientSMS(aPatient.ID, aPhoneNumber, "Hello!") 
  
if aPatientSms.DeliveryResult = 1 then  'ssdrError 
  aMessage = "Text: " & aPatientSms.Text & " (" &_ 
    aPatientSms.ErrorMessage & ")" 
else
  aMessage = "Text: " & aPatientSms.Text & " (Sent)"    
end if
  
Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Error Message can be found in Organisation > Control Centre > Manage > SMS Log.

Version information

Added in v7.8.0