B4J Question Can anyone help with an Example of Asscheduler UpdateAppointment


Licensed User
I am hoping someone can help me with some example code for Asscheduler update appointment as I have been struggling for nearly a month now. I have resorted to clearing the whole thing and creating new booking for the whole diary every time I have to update an appointment and this has made app slow.

(1) My procedure is to double click on the appointment as shown below

Private Sub ASScheduler_MonthView1_AppointmentDoubleClick(Appointment As ASScheduler_Appointment)
UserForm.CreateNewBooking = False
UserForm.jobNum = Appointment.Description
UserForm.jobNum = UserForm.jobNum.Replace("'","")
Variables.AssJobNum = Appointment.Id
End Sub

(2) I save the appointment id to a long Variable
(3) I then call my booking form

(4) When I have amended my booking I then save this as follows(I have tried numerous methods as you can see
private Sub Daysupdate
Dim StartDate As Long = DateTime.DatetimeParse(Variables.LB5, Variables.Times)

' Dim Appointment1 As ASScheduler_Appointment = ASSchedulerUtils.CreateASScheduler_Appointment(Variables.AssJobNum,Variables.LB1 & " " & Variables.LB2,Variables.LB4,xui.Color_aRGB(argb(0),argb(1),argb(2),argb(3)),False,StartDate,StartDate + DateTime.TicksPerHour*1.5)

' ASSchedulerUtils.API.UpdateAppointment(Appointment1)

UserForm.DayView.API.UpdateAppointment(ASSchedulerUtils.CreateASScheduler_Appointment(Variables.AssJobNum,Variables.LB1 & " " & Variables.LB2,Variables.LB4,xui.Color_aRGB(argb(0),argb(1),argb(2),argb(3)),False,StartDate,StartDate + DateTime.TicksPerHour*1.5))
' ASSchedulerUtils.API.SQL.TransactionSuccessful

If DiaryTwo.frm.IsInitialized = True Then
End If

End Sub

I have tried deleting the appointment (which works)
Then creating a new appointment and then refreshing . I get no errors but the appointment does not show

I have search this sight for an example of Updateappointment to have com up with nothing


Alexander Stolte

Licensed User
Longtime User
I already asked you last time to provide an example project that shows what you are doing. The code you provide is not enough to help you.

Have you already tried to put a "Sleep(0)" between "Create" or "Update" and the "Refresh"?
Refresh Scheduler
Upvote 0