ISCase.IsNew

Description

Returns True if the case is being created and has not been saved in the database yet.

Syntax

object.IsNew

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

Return Value

bool

Example

Display IsNew for the case.

Dim aTrans
Dim aPatient 
Dim aCaseTypes, aCaseType
Dim aNewCase
Dim aFilter

Set aTrans = Profile.StartMapTransaction  
set aFilter = Profile.CreateCaseTypesFilter
aFilter.Description = "Case Type 1" 
set aCaseTypes = Profile.LoadCaseTypes(aFilter)

if aCaseTypes.Count = 0 then 
  Profile.MsgBox("No case type with the specified description")
  exit sub
end if
  
set aCaseType = aCaseTypes.Item(0)
  
set aPatient = Profile.SelectPatient
set aNewCase = Profile.CreateCase(aPatient.ID)
aNewCase.CaseTitle = "New Case"
aNewCase.CaseType = aCaseType
aNewCase.SourceRef = "MySourceRef " & aNewCase.ID

Profile.MsgBox(aNewCase.CaseTitle & " (opened on " & aNewCase.OpenedOn &_ 
  ") is new: " & aNewCase.IsNew) 

aTrans.SnapShot 

Profile.MsgBox(aNewCase.CaseTitle & " (opened on " & aNewCase.OpenedOn &_ 
  ") is new: " & aNewCase.IsNew)   
Note:

In Profile Client v8 on User Interface Is New cannot be found.

Version information

Added in v7.8.0