You need to sign in to do that
Don't have an account?
JPSeabury
Salesforce Calendar, Google Calendar, or PHP Calendar
I have a custom object called "Maintenance Window", which includes a start date/time and end date/time for the event. Typically these are 1-6 hour long events, but the often cross the midnight boundary. My current project is to map these events on to a calendar -- so that a user can see all the upcoming (or historic) maintenance windows on a monthly calendar, at a glance. The Maintenance Window detail records and Calendar need to stay in synch, so that if the start or end date/time fields on the Maintenance Window are updated, the calender will be updated to reflect this information, as well.
I've yet to decide where I'm going to map these events -- either to a public calendar in SFDC, a group calendar in Google, or a PHP calendar. I'm leaning toward the latter, I think. We're already copying the data over manually to a PHP calendar (it's this manual copy / data duplication that I'm looking to eliminate), and I really like the visual appearance of the PHP calendar (and the ability to control the font colors and details in the PHP Calendar).
Still, as much as I like the PHP calendar, my preference is to keep everything in one tool -- SFDC. Less databases / servers to maintain, yeah?
Have any of you done something like this? Which of these options (or something completely different) did you go with, and why? What were your biggest pitfalls and "if I had to do it all again, I would have ..."
I had an epiphany yesterday on this. Why use the Salesforce Calendar, Google Calendar or a PHP Calendar at all? All of those are just graphical represenations of data in a database. I already have the data in a database. It's stored as detail records in a custom object, which include custom fields for scheduled start date/time and scheduled end date/time.
I just need to display this data in something that looks like a calendar. I can do that in Visualforce page as a table!
It would be neat if there was already a page controller or a template for a "daily planner" or calendar (or both). Anyone have a VF calendar-like page up their sleeve?
I have a need much like you have described here for a session calendar that allows viewing of session dates from a custom object. I too started out with a standard SF calendar but ran into the API issues. I do like the idea of the calendar based on a VF page . Can you tell me more about how you have made out with this? I would like to create my calendar and perhaps share it among users via Google Apps.
Thanks JP, that looks like it is just what I am looking for! I do appreciate your quick response and your help.
Don Waters
Review the code in the 2nd Apex Class called "public class Month". Add it the same way you did the "public class repeatCon" class.
A warning -- you're still going to have issues. The code is not complete yet. The sample code shows how to create a List of Lists. You'll still need to do some code mods to get this running. If I recall, I just commented out a line in the setEvents method, because it referenced an object that wasn't known to my instance "EventItem".
That should allow it to run normally.
If not, can you be more specific on where what code goes where?
I implemented the code through our organization's sandbox, then deployed it into production using the Eclipse IDE.
I'm afraid it wouldn't be terribly useful for me to post the modified code I used to create the calendar picture above. The information displayed is for a custom object, which has some complex junctor object relationships underneath it. I'm afraid my Apex code would make readers dizzy (at least, it has that affect on me), and wouldn't be terribly helpful as a tutorial on building the app.
I think you're better off taking the links to Ron Hess's calendar sample source
LINK: http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=920
Use that as the frame work for your Visualforce page and apex classes (you'll be creating two classes, he provides the source in the link above). Ron's code was sample source only, it wasn't intended to run on it's own. You will get a save error when you try to save one of the classes (I think it was the "Month" class), but you should be able to figure out the error and comment out the offending code, just to see what his calendar applet looked like.
If that's beyond your Apex / VF coding level right now, I'd start learning more about these tools here: http://wiki.apexdevnet.com/index.php/Apex_and_Visualforce