Hi, I would like to have access to the reminder property of an Appointment through office-js, so that I can read and manipulate the reminder settings of an appointment in Outlook add-ins. Currently, there is no way to get or edit appointment's reminder property using office-js. Our new feature needs the Reminder information, and we would have to make REST Api calls only because of that one property. Proposed API: A possible API design for this feature is: Add a new property reminder to the Office.Appointment interface, which returns an Office.Reminder object that represents the reminder setting of the appointment. Add a new interface Office.Reminder that has the following properties and methods: setAsync(minutesBeforeStart, callback): A method that sets the reminder of the appointment to the specified number of minutes before the start. The callback function is invoked with either an error or a result object when the operation is complete. getAsync(callback): A method that gets the current reminder setting of the appointment. The callback function is invoked with either an error or a result object when the operation is complete. clearAsync(callback): A method that clears the current reminder setting of the appointment. Example code: // Get the current appointment
var appointment = Office.context.mailbox.item;
// Get the current reminder setting
appointment.reminder.getAsync(function(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
// Display the current reminder setting to the user
var minutesBeforeStart = asyncResult.value;
console.log("Reminder set for " + minutesBeforeStart + " minutes before start");
} else {
// Handle error
console.log("Error getting reminder: " + asyncResult.error.message);
}
});
// Set a new reminder setting
var newMinutesBeforeStart = 15; // Change this value as needed
appointment.reminder.setAsync(newMinutesBeforeStart, function(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
// Confirm that the reminder setting was updated
console.log("Reminder updated successfully");
} else {
// Handle error
console.log("Error setting reminder: " + asyncResult.error.message);
}
}); This feature request is important for developers who want to create and manage custom reminders for their appointments in Outlook add-ins. It would enhance the functionality and user experience of Outlook add-ins that deal with appointments, such as scheduling, reminders, notifications, etc. It would also align with the existing APIs for other properties of appointments, such as subject, location, start, end, etc. Moreover, this feature request is timely and relevant, as the new outlook is also coming soon. Please consider adding this feature to the office-js library. Thank you for your attention and support.
... View more