|
| [WD20] Schedule Control - Preventing Default Process |
| Iniciado por guest, 01,may. 2015 20:51 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 01,mayo 2015 - 20:51 |
I have a schedule control. When I right click an appointment and select modify the appointment turns into a temporary edit field. When I right click and select new appointment, the new appoinment turns into a temporary edit field.
I am trying to find a way to prevent this. When I right click and select new appointment I want to bring up my own appointment form. The code for this is below. The problem is after the call to FillSchedule() the code moves on to the 'Entry in edit in an appointment' process and turns the appointment into the temporary edit that I don't want. I've tried sending keys and mouse clicks, but it seems that code happens before the appointment is turned into an edit.
I want to do the same thing with edit/modify. Does anyone know how I can prevent this default behavior?
PROCEDURE BeforeCreation(aptCreated is Appointment) IF Open(WIN_Form_Task,True,0,Left(aptCreated.StartDate,<img src="/NG2013_WEB/ui/smiley/7.gif" align=absmiddle border=0 alt="8)">) THEN FillSchedule() ELSE // This code succesfully removes the temporary edit field if the new appointment/task was cancelled ExecuteProcess(MySelf,trtDeleteScheduleApt, aptCreated) END PROCEDURE EnterInInput(aptEdited is Appointment) SendKey("{ESC}") |
| |
| |
| | | |
|
| | |
| |
| Publicado el 01,mayo 2015 - 22:42 |
Hi Curtis,
if you use the code:
Result False
in the code-events of the scheduler, you can stop the action. And there are some possebilities in the 7-tabs to disable some actions. Hope it helps you. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 01,mayo 2015 - 23:08 |
Awesome. I had been unsuccessfully trying to use RETURN. Thanks Stefan!
Unchecking 'Allow the direct input on an appointment' easily fixed my problem.
Before I unchecked that option I also got it to work with this code: PROCEDURE EnterInInput(aptEdited is Appointment) nTaskID is int = aptEdited.ID IF nTaskID > 0 THEN // Modifying IF Open(WIN_Form_Task,False,nTaskID,Left(aptEdited.StartDate,<img src="/NG2013_WEB/ui/smiley/7.gif" align=absmiddle border=0 alt="8)">) THEN FillSchedule() END ELSE // Creating HReset(Task) IF Open(WIN_Form_Task,True,0,Left(aptEdited.StartDate, ) THEN FillSchedule() ELSE ExecuteProcess(MySelf,trtDeleteScheduleApt, aptEdited) END END RESULT False // Prevents appointment from becoming temporary edit field |
| |
| |
| | | |
|
| | | | |
| | |
|