0

I'm developing an Outlook add-in, the purpose is to create an appointment with its different properties.

Is that possible to modify the value of the reminder field with the Mailbox API? I can't find a method which do that in the documentation (https://dev.outlook.com/reference/add-ins/). Reminder field

Tim Wan
  • 155
  • 6
ali
  • 31
  • 2

3 Answers3

0

When something is not available with Office.js api for an Outlook Add-in you can try to use the Exchange Web Services (EWS) to do perform the action

Have a look at this previous answer.

In this answer, I gave code snippets for both (client side or server side approach).

Community
  • 1
  • 1
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53
0

You can use the UpdateItem EWS operation to set flag and reminder fields using the mailbox.makeEwsRequestAsync method:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"               xmlns:xsd="http://www.w3.org/2001/XMLSchema"               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <soap:Header>
    <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
  </soap:Header>
  <soap:Body>
    <m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
      <m:ItemChanges>
        <t:ItemChange>
          <t:ItemId Id="AAMkAGUzNmEzYTBmLTI1NDItNGE0My1iZDk5LWFkMDgxODI3YWNlOQBGAAAAAACK2VEhi72QSaw+u0XV7xUHBwCMotTyA3QkQ7TPAmcrRt4FAAAALwVDAAAuH/1UA8tzTYD5jbYriaIUAAJEgGbPAAA=" />
          <t:Updates>
            <t:SetItemField>
              <t:FieldURI FieldURI="item:Flag" />
              <t:Message>
                <t:Flag>
                  <t:FlagStatus>Flagged</t:FlagStatus>
                  <t:StartDate>2016-02-24T00:00:00.000Z</t:StartDate>
                  <t:DueDate>2016-02-24T00:00:00.000Z</t:DueDate>
                </t:Flag>
              </t:Message>
            </t:SetItemField>
            <t:SetItemField>
              <t:FieldURI FieldURI="item:ReminderDueBy" />
              <t:Message>
                <t:ReminderDueBy>2016-02-24T15:00:00.000Z</t:ReminderDueBy>
              </t:Message>
            </t:SetItemField>
            <t:SetItemField>
              <t:FieldURI FieldURI="item:ReminderIsSet" />
              <t:Message>
                <t:ReminderIsSet>true</t:ReminderIsSet>
              </t:Message>
            </t:SetItemField>
            <t:SetItemField>
              <t:FieldURI FieldURI="item:ReminderMinutesBeforeStart" />
              <t:Message>
                <t:ReminderMinutesBeforeStart>0</t:ReminderMinutesBeforeStart>
              </t:Message>
            </t:SetItemField>
          </t:Updates>
        </t:ItemChange>
      </m:ItemChanges>
    </m:UpdateItem>
  </soap:Body>
</soap:Envelope>
Eric Legault
  • 5,706
  • 2
  • 22
  • 38
0

As of today (requirement set 1.3) I don't think there is a method in Office.js which allows you to get or set the reminder field of an appointment. Other people have already mentioned that you may try using EWS call to perform the action.