Skip to main content

I am having problems understanding how to setup the Calendar Component.

Simple Use Case:  Setup a Weekly view with available appointments.  Need the available appointments to display in an available appointment color.   The User should be able to schedule an appointment when there is an available time slot.  Scheduled time slots should change to scheduled color.

I am using the Event object.
I am having problems understanding how to setup the model(s).

Questions:
* Should I create a separate Object for the Available Appointments?
* There seems to be many different models I need to setup.  For example: Valid Date Range Model, Event Source Model, Week View Group Model… od are all of these models suppose to be different objects.  Not sure what they all mean.]]

I’ve read the Calendar tutorials already, it helped, but I think I need to understand the questions above in order to implement what is needed.

Thank you in advance.


Most likely, you are working with one object (the Event object), unless you want to use some custom objects you’ve created as well. Your calendar can display as many event sources as you want, and each of these event sources is related to a different model. These different models can all be on the Event object, but they may have different conditions to display different kinds of events for different event sources. For example, you may want a model “MyEvents”, containing only events where “Assigned To” is the user viewing the page. In your case, I’m guessing “Available Appointments” is dependent on a certain field? In this case, you may want to have two event sources, one for “All Appointments” and one for “Available Appointments,” where the Available Appointments model has a condition on the field(s) determining whether this appointment is available or not.


As to things like Week View Group Model, I don’ t know if you actually need a model for this. The week, day, and month views come built-in with Skuid. So when you add a view to your calendar, everything should already be set up to view your event sources in that view.


If you choose to use grouping (for example, in the week view), you will probably need a separate model for this. Admittedly, this can be confusing. My example was grouping by the user that an event was assigned to. I made a separate model on Users, then I can set conditions on this model if I only want to pull in certain users. After making this model, you have to be sure to do several things:



  1. Include a grouping field in your event model (in my case, OwnerId, which points to a user).




  2. Set the Grouping Field on the Event Source.




  3. On the week or day scheduling view, set the Grouping Model and field(s) from the grouping model that you want to display in these column labels (in my case, I want Name of each user to display in the calendar).



I hope isn’t just what you got from the tutorial. Let me know if all this makes sense!


Yes.  Thank you for your help.  Your post is guiding me in the right direction.

I Understand the filtering on Event based on some field to have an Available and Scheduled Appointments list.  Thank you.

On another note:  what is this model supposed to do: (Valid Date Range Model).
f9231045f0beb49e740fbe083f7a7b1843db7884.png

Thank you.


Just wanted to share some progress that works for the lanes.

For defining the lanes:

92f85efe7e3de7a6b63337e9045e34732b051104.png

Used a Custom Settings instead of an object:



I see that Ben started working with you on your other post? I think you are right that Salesforce does not allow you to create custom lookup fields on the Activity object… yuck! I found a post about it here. Looks like they are taking the idea into consideration! For now, your best option would be either to use the standard lookup fields under “Event Fields”, or create a custom Event object with lookups to other objects. Unless Ben has a better suggestion?


Thank you for responding.  I went ahead and created a separate object ‘appointments’ and a related object ‘rooms’.  With these models I was able to get the lanes up and running on and the calender setup the way I needed it.  It took a while, but I think I have a better understanding the way this component works. 

Thank you and Ben.83369cdb452fe8500891f94659e55744133eef1e.png


Glad you were able to get things working. I know the calendar component (along with Salesforce Activities) can be really tricky. Let me know if you run into anything else!


FYI, custom Activity lookup fields are in pilot/beta now: https://success.salesforce.com/ideaview?id=08730000000BrPdAAK