Do not use. The method is not supported for the versioned object.
object.LoadAppointments(aDate[, aPOS = ""])
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISProviderVers interface |
|
aDate |
In, Required | DateTime |
The date of the appointment |
aPOS |
In, Optional Default value is "" |
string |
The code of the POS for the
appointment |
sub main()
Dim aFilter
Dim aProviders
Dim aPos
Dim aVersionDate
Dim aAppDate
Dim aDate
Dim aMessage
Set aFilter = Profile.CreateProvidersFilter
aFilter.Category = 2 'pcProvider
aFilter.Code = "VE3"
set aProviders = Profile.LoadProvidersByFilter(aFilter)
aPos = "LONSDALE"
aVersionDate = #06/10/2019#
aAppDate = #07/11/2019#
aMessage = GetProviderCollectionInfo(aProviders, aDate, aPos, aAppDate)
Profile.MsgBox(aMessage)
end sub
function GetProviderCollectionInfo(aProviders, aVersionDate, aPos, aAppDate)
Dim aProvider
Dim aProviderOnDate
Dim aInfo
aInfo = ""
for each aProvider in aProviders
aInfo = aInfo & vbNewLine & vbNewLine & "PROVIDER: " &_
aProvider.FullName & vbNewLine
set aProviderOnDate = aProvider.VersionOnDate(aVersionDate)
if aProviderOnDate is nothing then
aInfo = aInfo & vbNewLine & " - " & aProvider.FullName &_
" (" & aProvider.Id & ") " & " - No Version on this date"
else
aInfo = aInfo & vbNewLine & "CURRENT VERSION: " & vbNewLine &_
"Full Name: " & aProvider.FullName & vbNewLine &_
"ID: " & aProvider.Id & vbNewLine &_
"Cell Phone: " & aProvider.CellPhone & vbNewLine &_
"Appointments: " & aProvider.LoadAppointments(aAppDate, aPos).Count & vbNewLine &_
vbNewLine & "VERSION ON DATE: " & vbNewLine &_
"Full Name: " & aProviderOnDate.FullName & vbNewLine &_
"ID: " & aProviderOnDate.Id & vbNewLine &_
"Cell Phone: " & aProviderOnDate.CellPhone & vbNewLine &_
"Appointments: " & aProviderOnDate.LoadAppointments(aAppDate, aPos).Count
end if
next
GetProviderCollectionInfo = aInfo
end function