How to add event listeners for appointment item in outlook taskpane add in? - outlook-addin

I have been following this example for adding event listeners but it doesn't work. Is there any way to listen when changes are made while creating an appointment in calendar (i.e. when attendees are added)?
The link I followed:
https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/pinnable-taskpane#implement-the-event-handler
I need to create a taskpane that will display emails as they are added as attendees.

To listen for when attendees are added in calendar, you can register for the RecipientsChanged event. This event triggers when the recipient list of the selected item or the appointment location is changed in Outlook. Support for this event was added in requirement set 1.7. Documentation about this event can be found here. Supported events include RecurrenceChanged, RecipientsChanged, and AppointmentTimeChanged.
To add the event, you would need to call addHandlerAsync like:
Office.context.mailbox.item.addHandlerAsync(Office.EventType.RecipientsChanged, handler, callback);
where you can specify the handler and callback. Documentation for addHandlerAsync can be found here.

Related

Add custom data to google calendar attachment using Calendly

I am embedding Calendly into my application via react-calendly npm module. However, I stumbled upon a problem. I want to add some custom fields to the calendar event attachment section. For example, standard Google Calendar event created via Calendly will have the following information:
Event Name: Some Service
Need to make changes to this event?
Cancel: https://calendly.com/cancellations/f3ce3f74-e7b6-44c4-9f40-fe11e0126321
Reschedule: https://calendly.com/reschedulings/f7ce2f74-e7b6-44c4-93b0-fe11e0126621
And I want to be able to attach some custom information to the attachment section like
Need to make changes to this event?
Cancel: https://calendly.com/cancellations/f3ce3f74-e7b6-44c4-9f40-fe11e0126321
Reschedule: https://calendly.com/reschedulings/f7ce2f74-e7b6-44c4-93b0-fe11e0126621
customerAddress: <address_here>,
customerAge: <age>
However, I want this information only in our company Calendar and not customer calendar.
Can't find any useful information about how this problem can be solved. Any help or direction is appreciated.

How the "event user count" is calculated for any event in fabric-answer dashboard

There is a user count ( Event Users) to each event in answer dashboard. How this count is changed as I can see whenever I install the app then only its increased by 1. But I want it to be updated whenever any new user sign in/sign out to my app.
And is there any way to link all events to a particular user or add user info in all events by default so that we don't need to add in each event all the info individually?
Todd from Fabric. Right now it's not possible to track individual users through Answers. You can use custom events and attributes to log these activities, but you will need to set the attributes for each event as they happen. Check out this page for more info.

How to override the service now's email notification onclick event

I have a requirement like, When I click the email notification link in service now, the system should check for particular field is not null or null, if it is not null then only the service now's email notification window should open, otherwise one alert box should come say like pls enter that field first
As long as you are ok w/ all this validation being done client side you could modify the onClick event on the email notification link and add an additional function to check the value of the field and if not null, then call the original email onClick function.
Prototype is available in ServiceNow Forms clients side and provides a method to update attributes on elements.
You would need to modify the onClick function on the element with id='email_client_open', add a new onClick function to check that the field in question is populated and if so call the original function 'emailClientOpen(this, 'incident')' with the appropriate parameters.

Sharepoint 2010 event receiver ItemUpdated fires twice

I attach three events to my CustomLists:
ItemAdded
ItemUpdated
ItemDeleting
On one list I have a workflow, which is changing columns in that list. So when I edit an entry in that list, the ItemUpdated-Event fires two times. On the other lists (without any workflows) my receiver is working fine.
How can I find out if a workflow called my event receiver?
Is there a difference between a workflow which fires the event, or a user who fires the event?
You can add hidden field to the list which is always sets by workflow (and only by workflow). Then you will see if workflow called the event receiver.
Or
You can create HandleEventFiring class in your workflow project and use DisableAllEventFiring and EnableAllEventFiring before and after updates in workflow
public class HandleEventFiring : SPItemEventReceiver
{
public void DisableAllEventFiring()
{
this.DisableEventFiring();
}
public void EnableAllEventFiring()
{
this.EnableEventFiring();
}
}
To answer your first question:
Yes, you can find your workflow. The easiest way would be to use the SharePointManager 2010 and
Navigate to your site collection is located
Lists -> [Your List] -> Event Receivers
Check each Event Receiver's properties and delete the event receiver that is firing twice.
I don't know if I understand your second question correctly, but here goes:
A workflow can be started manually by a user or automatically if a List Item is
Added
Updated or
Deleted
Other than that there is not much of a differance.

List item event receiver on lists in multiple webs - SharePoint 2010

I have multiple webs instantiated using the same template. When the web is created a custom list is created as well. Is there a way to define a global event receiver to handle to handle the ItemAdded event for all the lists defined with that template?
No, i don't think this is possible. But you can register your event receiver on the custom list within the template, and all your (newly created lists, obviously) will have the event receiver registered automatically.