none
Read and Update Values From Default Appointment Form in Outlook RRS feed

  • Question

  • Hi,

        I do not need to modify the default form structure for add/ update of appointments.

    I only need to read the values in the form, such as attendee list, start and end DateTime of the appointment.

    I cannot use the AppointmentItem object, since the values in the form are not yet saved into the object.

    I simply could not find the properties and members of the default Appointment form, so I am unable to proceed.

    Also:

    1) if I can read the Appointment form values, can I also modify them?

    2) as and when the Appointment form values change, I want the dependent properties in my form to get updated as well. How can I achieve this?

    Background: I have created a separate form region (for IPM.Appointment messages), that does some additional processing based on the attendee list and meeting time. This needs to refer the latest value entered by the user into the Appointment form (rather than AppointmentItem object).


    • Edited by Ryetika Saturday, January 30, 2016 7:21 PM
    Saturday, January 30, 2016 6:48 PM

Answers

  • I was able to solve this issue the following way:

    To refresh data from "Appointment" form to my custom form:

    -------------------------------------------------------------------------

    1) I created a new button

    2) moved all the functionality from FormRegionShowing(), to another function, which FormRegionShowing now calls.

    3) called this new function when the button is clicked

    To refresh data from custom form to the "Appointment" form

    ---------------------------------------------------------------

    Added the following code at the end of the changes in my custom form:

                inspector.HideFormPage("Appointment");

                inspector.ShowFormPage("Appointment");

                inspector.SetCurrentFormPage("Appointment");

    • Proposed as answer by David_JunFeng Monday, February 1, 2016 5:49 AM
    • Marked as answer by David_JunFeng Friday, February 5, 2016 9:03 AM
    Sunday, January 31, 2016 10:07 PM

All replies

  • Hello Ryetika,

    This is a know issue in Outlook. You need to save the item programmatically (call the Save method) or just try to switch the focus to another UI field. Changes made by users in Outlook are not propagated to the OOM immediately.  

    Saturday, January 30, 2016 6:52 PM
  • Thanks for the response, but help me understand the following:

    1) Regarding saving the ApplicationItem:

    I don't think I can save the item, since the user has not yet sent the appointment (thus confirming the details in the form).

    A hack could be that I retain the original data in the AppointmentItem and before form exit due to cancel, I reset the original value.

    2) Changing the focus :

    Can you give me an example of this?

    Saturday, January 30, 2016 7:28 PM
  • I was able to solve this issue the following way:

    To refresh data from "Appointment" form to my custom form:

    -------------------------------------------------------------------------

    1) I created a new button

    2) moved all the functionality from FormRegionShowing(), to another function, which FormRegionShowing now calls.

    3) called this new function when the button is clicked

    To refresh data from custom form to the "Appointment" form

    ---------------------------------------------------------------

    Added the following code at the end of the changes in my custom form:

                inspector.HideFormPage("Appointment");

                inspector.ShowFormPage("Appointment");

                inspector.SetCurrentFormPage("Appointment");

    • Proposed as answer by David_JunFeng Monday, February 1, 2016 5:49 AM
    • Marked as answer by David_JunFeng Friday, February 5, 2016 9:03 AM
    Sunday, January 31, 2016 10:07 PM