Pages

Showing posts with label Event. Show all posts
Showing posts with label Event. Show all posts

Friday, August 26, 2016

Salesforce: Enable Drag-and-Drop Scheduling on List Views

In earlier blog, we discussed about how to drag and drop to edit event from Calendar. Today we will share about feature to drag and drop scheduling on List Views.

This feature will let users create events associated with records by dragging records from list views to weekly calendar views and entering event details in an interactive overlay. The fields available in the event detail and edit overlays are defined in a mini page layout.

Admin need to enable this from Setup | User Interface | select Enable Drag-and-Drop Editing on Calendar Views | select Enable Click-and-Create Events on Calendar Views, then you can select Enable Drag-and-Drop Scheduling on List Views


This feature is only enable in Classic for Account, Contact, and Lead List View only, and Tab view is not count, meaning you need to select a View to see this.



1. Click the Open Calendar icon Open Calendar link at the bottom of a list view.
    A weekly view of a calendar appears below view.
 


2. Drag a record from the list to a time slot on the calendar.



3.  A popup window for creating an event appears. The event is already related to the record that you dragged from the list view.




Notes:
  • Drag-and-drop scheduling isn’t available for the Console tab, events that people have been invited to, recurring events, accessibility mode, or Connect Offline.
  • List views that include drag-and-drop scheduling can take slightly longer than usual to be displayed.
  • When you drag the bar in between the list and calendar to resize either one, the size is saved for all views in which you use drag-and-drop scheduling. You can resize the list and calendar at any time.


Reference:


Thursday, August 25, 2016

Salesforce: Enable Drag-and-Drop Editing on Calendar Views

In current era of Lightning; Classic still in the heart of many Salesforce users, and this blog is going to explain on how to use drag and drop in editing on Calendar Views, at this moment this feature only for Classic. Admin need to enable this from Setup | User Interface | select Enable Drag-and-Drop Editing on Calendar Views.

This feature will enable dragging of events on single-user, daily and weekly calendar views. This allows users to reschedule events without leaving the page



Once enabled, go to Calendar Day View or Week View (not Month View).



You should be able to drag and drop existing event for the week or day, this feature is not for Month View.



If you have Enable Click-and-Create Events on Calendar Views enabled, this will let users create events on day and week calendar views by double-clicking a specific time slot and entering event details in an interactive overlay. The fields available in the event detail and edit overlays are defined in a mini page layout. Recurring events and multi-person events aren’t supported for click-and-create events on calendar views.



Reference:


Thursday, May 26, 2016

Salesforce: Multi-Person Calendar Event (User as invitee)

In previous blog Multi-Person Calendar Event (Contact / Lead as invitee), we discussed about adding contact or lead as invitee, we also discussed the structure at the backend and how we can use API to add contact or lead as invitee.

But, when the invitee is a user, the structure will be a little different, although the objects used is the same.

1. Event object
Instead of create only 1 event record as add contact/lead as invitee, invite user will create multiple event record based on number of invitee + sender. In this scenario, we are going to invite 2 users and 1 contact.


Sample query: Select Id, Subject, OwnerId, GroupEventType, IsChild, WhatId, WhoId, CreatedDate, ActivityDate, ActivityDateTime, StartDateTime, EndDateTime, EventSubtype, IsReminderSet, Type, WhatCount, WhoCount FROM Event WHERE Subject = 'Test with User'


This will create 3 events with same subject, one event for each User, but only 1 with IsChild = False, which is "parent" event. Also notice that each record have different Owner Id, and all events with GroupEventType = 1, remember that we cannot populate / update GroupEventType manually.


2. EventRelation object
Sample query: SELECT Id,EventId,RelationId,IsParent,IsWhat,IsInvitee,Status,CreatedDate FROM EventRelation WHERE EventId IN ('00U63000001T8Y9EAK','00U63000001T8YAEA0','00U63000001T8YBEA0')


Notice that records created in this object is relate to: 1 opportunity, 1 contact and 2 users, but all linked to the same event, which is parent event where IsChild = False.


3. EventWhoRelation object
Same with EventRelation object, only 1 record created as we only have 1 contact relate to the event, and it is linked to the parent Event (IsChild = False)

Sample query: SELECT Id, EventId, RelationId, Type, CreatedDate FROM EventWhoRelation WHERE EventId IN ('00U63000001T8Y9EAK','00U63000001T8YAEA0','00U63000001T8YBEA0')



How to auto add User as Invitee Event with API?

You just need to insert record(s) to EventRelation object, 1 record for 1 contact / lead. Here are fields you need to populate:
1. EventId = Event Id
2. RelationId = User Id
3. IsParent = False
4. IsWhat    = False
5. IsInvitee = True
6. Status   = New

This is similar with add Contact / Lead as invitee, the difference is: Salesforce will auto create event record for the user as child record, if the parent record initially is not for multi-person, GroupEventType will change from 0 to 1.



Salesforce: Multi-Person Calendar Event (Contact / Lead as invitee)


In Salesforce, you can create event and relate to multiple Contacts (up to 50 contacts), but make sure you have enable Allow Users to Relate Multiple Contacts to Tasks and Events from Setup | Customize | Activities | Activity Settings.

You also can invite Contacts that is not defined in the Relate To for the event, including from Leads.


As you see from screenshot above, the event is relate to Opportunity and 2 contacts, we add both Contacts as invitee, and then we also add 2 Leads as Invitee.


So what happened in the backend ?

1. Event object
Salesforce create a new event record, because this is Multi-Person Calendar Event, notice GroupEventType = 1; while WhoId is the primary Contact.

Note that you cannot populate GroupEventType from API, but the value will be auto populate based on event category:
  • 0 (Non–group event)—An event with no invitees.
  • 1 (Group event)—An event with invitees.
  • 2 (Proposed event)—An event created when a user requests a meeting with a contact, lead, or person account using the Salesforce user interface.  

Sample query: Select Id, CreatedDate, ActivityDate, ActivityDateTime, ReminderDateTime, StartDateTime, EndDateTime, EventSubtype, GroupEventType, IsReminderSet, OwnerId, Subject, Type, WhatCount, WhatId, WhoCount, WhoId FROM Event WHERE Id = '00U63000001T8XGEA0'


2. EventRelation object
Represents people (a user, a lead, or contacts) or a resource (such as a conference room) invited to an event.  For above screenshot scenario, query to this object for above event will return 5 records: 2 Contacts, 2 Leads and 1 Opportunity.

Sample query: SELECT Id, EventId, RelationId, IsParent, IsWhat, IsInvitee, Status, CreatedDate FROM EventRelation WHERE EventId = '00U63000001T8XGEA0'



3. EventWhoRelation object
Represents the relationship between an event and a lead or contacts, this object DO NOT have relation with invitee, but it is pure on contacts or lead Relate To the Event. EventWhoRelation allows a variable number of relationships: one lead or up to 50 contacts. Available only if you’ve enabled Shared Activities for your organization.

Sample query: SELECT Id, EventId, RelationId, Type, CreatedDate FROM EventWhoRelation WHERE EventId = '00U63000001T8XGEA0'

From the top screenshot scenario, query will return 2 records which is Contact relate to: Mike Lee and Jack Man. We cannot create record directly in EventWhoRelation object with API.


How to auto add Contact / Lead as Invitee Event with API?

You just need to insert record(s) to EventRelation object, 1 record for 1 contact / lead. Here are fields you need to populate:
1. EventId = Event Id
2. RelationId = Contact Id / Lead Id
3. IsParent = False
4. IsWhat    = False
5. IsInvitee = True
6. Status         = New


Reference:


Page-level ad