Returns True if the letter is being created and has not been saved in the database yet.
object.IsNew
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISLetter interface |
bool
Display IsNew for the letter.
Dim aPatient
Dim aLetters, aLetter
Dim aTemplate
Dim aTemplateId
Dim aNewLetter
Dim i
Dim aMessage
Set aPatient = Profile.SelectPatient
set aLetters = aPatient.GetLetters (1) ' slcfWordRTF
aMessage =_
"The number of the letters of the selected format is " & aLetters.Count
aTemplateId = 0
for i = 0 to aLetters.Count - 1
set aLetter = aLetters.Item(i)
set aTemplate = aLetter.Template
if not aTemplate is nothing then
if aTemplate.Subject = "Consultation Slips" then
aTemplateId = aLetter.Template.ID
end if
end if
next
if aTemplateId > 0 then
set aNewLetter = Profile.CreateLetter (aPatient.ID, aTemplateId)
aMessage = aMessage & vbNewLine & " The letter was successfully created " &_
"Is New: " & aNewLetter.IsNew
else
aMessage = aMessage & vbNewLine & " There is no letter template with the specified subject"
end if
Profile.MsgBox (aMessage)
In Profile Client v8 on User Interface Is New cannot be found.