Message

Contents

General
CloudAssessSpec
CollegePreferenceService
CsvBuilder
DocumentService
DocumentSpec
EmailSpec
ExportSpec
MailchimpSpec
Mask
Money
Preferences
QualityResultSpec
ReportSpec
SmsSpec
SystemUserService
Database objects
ACLAccessKey
ACLRole
Account
AccountTransaction
Application
Article
ArticleProduct
Assessment
AssessmentClass
AssessmentSubmission
AttachmentData
Attendance
Banking
Certificate
ClassCost
ConcessionType
Contact
ContactRelation
ContactRelationType
CorporatePass
CorporatePassCourseClass
CorporatePassProduct
Country
Course
CourseClass
CourseClassTutor
CourseModule
CustomField
CustomFieldType
DefinedTutorRole
Discount
DiscountConcessionType
DiscountCourseClass
DiscountMembership
DiscountMembershipRelationType
Document
DocumentVersion
EmailTemplate
Enrolment
EntityRelation
ExportTemplate
Field
FieldConfiguration
FieldConfigurationScheme
FieldHeading
FundingSource
FundingUpload
FundingUploadOutcome
Import
Invoice
InvoiceDueDate
InvoiceLine
InvoiceLineDiscount
Language
Membership
MembershipProduct
Message
MessagePerson
Module
Note
Outcome
PayLine
PayRate
PaymentIn
PaymentInLine
PaymentMethod
PaymentOut
PaymentOutLine
Payslip
Preference
PriorLearning
Product
ProductItem
Qualification
Report
ReportOverlay
Room
SavedFind
Script
Session
SessionModule
Site
Student
StudentConcession
Survey
SystemUser
Tag
TagRelation
TagRequirement
Tax
TrainingPackage
Tutor
TutorAttendance
UnavailableRule
Voucher
VoucherPaymentIn
VoucherProduct
WaitingList
Enumerations
AccountTransactionType
AccountType
ApplicationStatus
AttachmentInfoVisibility
AttachmentSpecialType
AttendanceType
AvetmissStudentDisabilityType
AvetmissStudentEnglishProficiency
AvetmissStudentIndigenousStatus
AvetmissStudentLabourStatus
AvetmissStudentPriorEducation
AvetmissStudentSchoolLevel
ClassCostFlowType
ClassCostRepetitionType
ClassFundingSource
ClientIndustryEmploymentType
ClientOccupationIdentifierType
ConfirmationStatus
ContactDuplicateStatus
CourseClassAttendanceType
CourseEnrolmentType
CreditCardType
CreditLevel
CreditProviderType
CreditType
DeliveryMode
DeliverySchedule
DiscountType
EnrolmentStatus
EnrolmentVETFeeHelpStatus
EntityRelationType
ExpiryType
FieldConfigurationType
InvoiceType
KeyCode
KeyCollision
MessageStatus
MessageType
MoneyRounding
NodeSpecialType
OutcomeStatus
PaymentSource
PaymentStatus
PaymentType
PayslipStatus
PostcodeType
ProductStatus
ProductType
QualificationType
RecognitionOfPriorLearningIndicator
StudentCitizenship
StudentStatusForUnitOfStudy
StudyReason
SurveyTypeSource
SurveyVisibility
TriggerType
UsiStatus
VETFeeExemptionType
VoucherPaymentStatus

A message sent to a Contact record can represent an SMS, email or postal document. A Message might be sent as email, SMS or post all at the same time and be delivered by two or more of those means to the same users. It is possible for a Message to sent to a single Contact or to thousands. Email and SMS messages are queued on the onCourse server and delivered in the background in a batch process every minute or so.

 
        public 
        Message
     {
}

Instance methods

addTag(tag)

Add a tag to this object. If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

Tag tag

the tag you want to add

Returns boolean

true if the tag is found and added

addTag(path)

Add a tag to this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag is found and added

contacts

If some contacts don't have email addresses or mobile phone numbers at the time of creation, then some messages may fail to be delivered. If the Message contains two or more of SMS, email or postal components then some of the Contacts in this list may only receive some those components. For example, some contacts may have a mobile phone number and not an email; others have email and no phone, and others have both.

Returns Not null List<Contact>

the list of contacts to whom the message is sent

createdBy

Returns Not null SystemUser

the SystemUser who created the message

createdOn

Returns Date

the date and time this record was created

creatorKey

Returns Nullable String

specific key of the message. It can be set in scripts.

emailBody

If this message is an email, this returns the plaintext body. Although it is possible to send an email with an html part only, it is recommended that you always send a plaintext part as well in order to support all users with different devices.

Returns String

plaintext message

emailFrom

Returns String

a properly formatted email address

emailHtmlBody

If this message is an email, this returns the html body. It is possible for this part to be null or empty even if the message is an email, in which case only the plaintext message will be sent.

Returns String

html message

emailSubject

If this message is an email, this must contain a not empty subject string

Returns String

subject

messagePersons

Returns Not null List<MessagePerson>

the intermediate table linking to Contacts

modifiedOn

Returns Date

the date and time this record was modified

postDescription

If this message is sent by snail mail (post), this contains a description of what was sent

Returns String

a human entered description of the message

smsText

If this message is an SMS, this contains the text. If the text is longer than a standard SMS length, it will be delivered as two or more SMS messages, incurring additional charges

Returns String

SMS content

tags

Returns Not null List<Tag>

The list of tags assigned to message

tags

Get all tags related to this object.

Returns List<Tag>

List of related tags

hasTag(path)

Check to see whether this object has this tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

Returns boolean

true if the tag is found and is attached to this object

hasTag(path, isSearchWithChildren)

Check to see whether this object has this tag or it's child tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

boolean isSearchWithChildren

flag to define whether need to find in children tags or not

Returns boolean

true if the tag or it's children is found and is attached to this object

removeTag(tag)

Remove a tag from this object. If the tag isn't already attached, this method does nothing and returns false.

Tag tag

the tag you want to remove

Returns boolean

true if the tag was found and removed

removeTag(path)

Remove a tag from this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag isn't already attached, this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag was found and removed